How to configure Virtual Agent in Microsoft TeamsSummary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Configure Virtual Agent to work within Microsoft Teams using the Messaging Apps Integration module. This article covers the Microsoft prerequisites, ServiceNow instance configuration, and how to add the Virtual Agent app in Microsoft Teams. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All supported releases Instructions<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Prerequisites Microsoft requirements Before configuring the integration, verify that you have the following on the Microsoft side: A Microsoft 365 account (personal or corporate) with admin developer accessA Microsoft 365 E5 Developer subscriptionAt least one test user added to your Microsoft Teams environment. Note the user name and full domain value (for example, User1@Domain.onmicrosoft.com). You will need this to create a matching user on the ServiceNow instance. For instructions on setting up these Microsoft prerequisites, see the following Microsoft documentation: Prepare your Microsoft 365 tenantMicrosoft 365 Developer ProgramSet up a developer subscription Note: After creating a new Microsoft account, you may need to wait a few hours for registration to complete before proceeding. After creating test users (which can take up to an hour), you can access them from the 365 Admin Center using your E5 developer account credentials. ServiceNow role requirements The following roles are required to install the Virtual Agent Microsoft Teams integration: ServiceNow: virtual_agent_admin and external_app_install_admin (or admin)Microsoft Teams: Global Admin Note: The integration supports only users with Microsoft Office 365 accounts. Microsoft Teams freemium accounts are not supported. Configure the ServiceNow instance Go to the ServiceNow instance where Microsoft Teams will be linked.Create a new user record on the instance: Set the User ID to the Microsoft user name (without the domain value).Set the Email to the full user name including the domain (for example, User1@Domain.onmicrosoft.com). Assign the admin role to this user.Log in as the newly created user and go to Messaging Apps Integration.Select Install next to Microsoft Teams. You are prompted to log in to a Microsoft account. Log in using the user account you are impersonating (created in the previous steps). If the user name does not appear, select Use another account.After logging in, select Accept to authorize the connection. Note: If this Microsoft account is already associated with a different ServiceNow instance for Microsoft Teams messaging integration, you are prompted to override the existing connection. Select Override, then select the same account again when prompted. A success confirmation is displayed. Add Virtual Agent to Microsoft Teams Go to https://www.office.com and log in as the same user you impersonated in step 4.Select Microsoft Teams.Select Apps, search for Virtual Agent, and select Add. Virtual Agent is now available in Microsoft Teams for the configured instance. Virtual Agent commands in Microsoft Teams Use the following commands when interacting with Virtual Agent in Microsoft Teams. Start a new conversation Type hi. The bot responds with options including End conversation, Chat with agent, and Cancel. Select End conversation to end the current conversation. Type hi again to start a new conversation.Select Cancel to return to the previous question.Select Chat with agent to connect to a live agent (available only if live agent is configured). If hi is not working and you are unable to proceed, type restart. If both hi and restart are not working, the user may be in a live agent chat. Type bye. Note: The commands hi and restart work only in Virtual Agent chat. They do not work in live agent chat. Connect to a live agent Run the Live Agent Support topic, orType agent and select Chat with agent when prompted. End a live agent chat Type bye. The bot responds with End Chat and Cancel options. Select End Chat to end the live agent session. Note: While in a live agent session, no commands other than bye are recognized. Troubleshooting Notifications not working While in the Global application scope, go to the Messaging Apps Integration page and verify that the Enable notifications flag is selected. Bot not responding for all users For Paris and earlier releases: Check if a configuration record is present in the sys_cs_adapter_configuration_page_teams table with the corresponding tenant ID.If no record is present, try reinstalling from the Messaging Apps Integration page. Retry from Microsoft Teams.Check if a record is present in the sys_cs_vendor_client_adapter_configuration table for the corresponding tenant ID.If no record is present, go to the sys_cs_adapter_configuration_page_teams table and change the name of your configuration (for example, add a period at the end).This change triggers a business rule that creates a record in sys_cs_vendor_client_adapter_configuration. Verify the record is created, then remove the period from the name in sys_cs_adapter_configuration_page_teams.Retry from Microsoft Teams. Bot not responding for specific users Go to the sys_cs_client_adapter table.Filter with the following criteria: Client type = Microsoft TeamsGroup ID = Tenant ID (found in the sys_cs_adapter_configuration_page_teams record)Consumer = the affected user Sort by created or updated date.Open the first record and check the conversationId in the adapter state.Copy the ID and filter using sys_id in the sys_cs_conversation table.If the conversation record is in a faulted state or the record is missing, delete the sys_cs_client_adapter record and retry from Microsoft Teams. Auth OIDC configuration issue If you see the following error: "Get for non-existent record: oidc_provider_configuration: initializing... WARNING *** WARNING *** No record found in oidc_provider_configuration for sysId=" Go to the application registry (oauth_entity.list).Select ServiceNow Virtual Agent Teams App.Verify that an entry is present in OAuth OIDC Provider Configuration.If no entry is present, select Microsoft Teams and save.Retry from Microsoft Teams. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Integrating Virtual Agent with messaging appsImprove Your Conversations with Microsoft Teams — Virtual Agent AcademyPrepare your Microsoft 365 tenantMicrosoft 365 Developer ProgramSet up a developer subscriptionManage and monitor Teams