Skip to main content

Microsoft Bot Framework Component

Manage conversational interactions across platforms using Microsoft Bot Framework

Component key: ms-bot-framework

Description

Microsoft Bot Framework is a comprehensive framework for building enterprise-grade conversational AI experiences. This component allows you to interact with the Bot Framework REST API to manage conversations and activities.

For additional context about the actions and the data they take please see the Bot Framework REST API Reference.

Connections

OAuth 2.0 Client Credentials

The Microsoft Bot Framework component authenticates using OAuth 2.0 Client Credentials associated with your Azure Bot's App Registration.

To begin you will need to create a new Azure Bot or retrieve the app id and app password (client secret) for an existing bot. If creating a new bot you will likely want to set its type to "Multi Tenant" to allow using your bot across tenants.

Open the Azure Bot and ensure that appropriate Channels are enabled and configured for your intended use case. Each will require additional configuration - Microsoft Teams, for example, will require a Teams app containing a manifest file specifying your bot's configuration with Teams.

Next, navigate to the "Configuration" blade of the bot and click "Manage" next to "Microsoft App ID". This will take you to the Azure AD App Registration for the bot. From here you are able to create a new Client Secret from the "Certificates & Secrets" blade. This will be your "Client secret" (some Microsoft documentation also refers to this as the "app password").

The Client ID and Tenant ID (for Single Tenant bots) can be retrieved from the "Overview" blade.

Next supply the following values to the OAuth 2.0 Client Credentials connection in your integration within Prismatic:

  • For Client ID enter the value for "Microsoft App ID" or the "Client ID" from the app registration.
  • For Client Secret enter the value from "Certificates & Secrets" of the app registration.
  • If your bot is configured as "Single Tenant" you will need to use the conventional Token URL for Azure: https://login.microsoftonline.com/tenantId/oauth2/v2.0/token and replace tenantId with the ID of your tenant.

Triggers

Bot Framework Trigger

Trigger that validates incoming requests as coming from Bot Framework | key: botTrigger


Actions

Create Conversation

Create a new Conversation | key: createConversation

Output Example Payload

{
"data": {
"id": "a:2-m3-i_J1YxM0_MmDD1Dw1h7R75WvLG9eHDFQCJMTWrKbtdBFSL29pEV8H3pMIsQidZSZQCFUT93CL53nbu0BObsfVtd6sCLA6xKIzlFUzxbseRMQ3_hzZJ-Eya_3HQg1"
}
}

Get Conversation Members

Get list of members of the conversation | key: getConversationMembers

Output Example Payload

{
"data": [
{
"id": "27:2iLsjhoGUI4x7idscaXgy4DVI2-NzYvXkz6izkpBtdZT7Ew3CCut_kgYaJMZnHdON_BmKfio3HwhFAPhPZS_83Q",
"objectId": "c8906b22-f59a-46b5-8552-21695374389a",
"name": "Example Name",
"givenName": "Example",
"surname": "Name",
"email": "example@example.onmicrosoft.com",
"userPrincipalName": "example@example.onmicrosoft.com",
"tenantId": "133e1a5c-01bb-4b41-b635-e11224d13d45",
"userRole": "user"
}
]
}

Raw Request

Issue a raw HTTP request | key: rawRequest

Note that you will need to construct a full URL using the Base URI (sometimes referred to as "Service URL") and a version path (example: https://smba.trafficmanager.net/apis/v3/conversations/abcd1234/activities/bf3cc9a2f5de... where https://smba.trafficmanager.net/apis/ is the Base URI, v3 is the version, and the remainder is the REST API action to perform).

Please refer to the Bot Framework REST API Reference for details on their API surface.


Send Adaptive Card Message

Send an adaptive card message | key: sendAdaptiveCardMessage

See adaptivecards.io for documentation on constructing card payloads.

Output Example Payload

{
"data": {
"id": "2579109807472"
}
}

Send Message

Create a message to a Conversation | key: sendMessage

Output Example Payload

{
"data": {
"id": "2779007726424"
}
}