Skip to main content

Microsoft Dynamics 365 Live Chat

Integrate your account with Microsoft Dynamics 365 Live Chat and allow users to connect with live chat agents on Microsoft through the bot. If your support agents are in the Microsoft account, you can establish a connection, allowing bot users to interact with those agents.

Create an Azure bot and obtain secret keys

As a first step you need to create an Azure bot and fetch the secret keys to establish an integration.

  1. Go to your Azure Portal > + Create a resource.

  2. Search for Azure bot in the search box and in Azure Bot click Create > Azure Bot.

  3. Create an Azure bot as mentioned here.

  4. Once you have created the bot, it looks like the screen below. Click on Go to resource.

  5. Go to Channels > Direct Line and copy the secret keys highlighted in the image below. These keys will be entered in the bot for the integration.

Obtain client secret

You need to fetch the client secret as it is required to configure the customer service admin centre.

  1. Go to Azure Portal > Manage Microsoft Entra ID > View.

  2. Go to App registerations and click the app that has the same name as the Azure Bot.

  3. Generate the client secret and copy the Application ID or client secret of the Azure AD app.

Configure Admin Centre

To configure the Admin centre, follow the steps mentioned below:

  1. Open your organization URL, (it looks this and click Customer Service Admin Center.

  2. Go to Channels > Messaging accounts.

  3. Create a new messaging account. Provide a name in Name and choose Custom in Channel. Authorize this and click Next.

  4. In Account details, enter the Microsoft app ID and the Client secret (from the previous steps) and click Validate.

  5. After validating the account details with the app ID and client secret, the platform will prompt you for custom channel configuration. Enter the details as shown in the image. Choose any name for the channel, ensure to include custom to help with the identification in the following configurations. Click Add.

  6. After configuring the channel, a message endpoint URL will be generated. Click Copy to copy the message endpoint as this will be needed to configure the Azure Bot.

Configure work stream

You need to configure work stream to route the chats to the right queues and right agents.

  1. Open your Microsoft workspace (for example: > Workstream > + New workstream. In Name, enter a name for your workstream and in Type select Message.

  2. In Channel, choose Custom and set the Work distribution mode as shown in the image below. Click Create.

    Once the workstream is created, it looks like the image below.

  3. Go back to Queues and create a new queue.

  4. Go back to the workstream you created and assign this queue in the Routing rules for the workstream to use the queue.

  1. Click Set up Custom.

  2. Choose the created custom channel.

  3. Verify the auto-populated details and click Create Channel.

  4. Go to your Azure bot resource > Configuration. In Message endpoint paste the message endpoint obtained from the previous steps and click Apply.

Authorize to access Microsoft Dynamics 365 live chat

  1. Go to Integrations > Live chat > Microsoft dynamics 365 live chat.

  2. Fill in the following fields:

  • Give account name: Provide a name to the Microsoft account you're connecting with
  • API secret: Paste the API secret(copied from previous steps).
  • Agent timeout (in milliseconds): Duration which the bot waits for a user input or interaction, and if no input is received within that time frame, the platform triggers a default response or take predefined actions.
  1. Click Connect.

  2. If you have multiple accounts, follow the above mentioned steps to add each of them. You can add a maximum of 15 accounts.

  1. In a two-tier environment, add account names in Development and use them in Live.
  2. In a three-tier environment, add accounts in Staging and Sandbox, and they'll be available in Production.

Connect bot users to live agents on Microsoft 365 Dynamic live chat


Use Ticket-closed in the Raise Ticket node to perform specific actions when a live chat closes, instead of using the ticket-close event.

To connect your users to live chat agents on Microsoft, follow these steps:

  1. Go to Studio and build a flow based on how you want the bot to take the user through the process.

  2. Include the Raise ticket node at the point in the flow where you want the user talk to Microsoft live agent. To accomplish this, include a Raise ticket node and choose Microsoft Dynamics 365 Live Chat under Live chat agent.

  1. Fill in the following fields in the node. The variables chosen for these fields must be previously collected in the flow via node. To know more about this in detail, click here.
Field nameData typeDescriptionSample value
Live chat agent--Choose Microsoft Dynamics 365 Live Chat in the drop-down
Account nameStringChoose the Microsoft account to which the chats should be transferredaccount1
Message after ticket assignmentStringThe message that will be displayed to the end user after a ticket is successfully assigned to an agentRequesting live agent connection.
NameStringName of the end userJohn
MobileStringMobile number of the end user9876543210
EmailStringEmail address of the end user. This is a mandatory field[email protected]
QueryStringThe subject/topic/reason why the ticket was createdI have a concern regarding my flight ticket
PriorityStringThe priority of the ticketMEDIUM

You can enable Advanced Options to set the priority, auto-translation, custom fields, tags and department.

  1. Once you have set up the flow, chats will get automatically forwarded to live agents on Microsoft live chat when this flow gets triggered.

  2. Once a user sends a message in bot, the agent will receive this notification in Microsoft live. He/She needs to click Accept to chat with the users.



On bot


On Microsoft Live