MS teams to SN integration not auto linkingIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } After installing ServiceNow for Microsoft 365 plugin in instance and when we try to send a message in the Virtual Agent MS teams bot app, ServiceNow has an error "VAMSTeamsAdapterAutoLinkAccount :: Autolinking - Cannot find User in Servicenow with UserPrincipalName - Email - " in the system log and my account is not linked. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Y onwards Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } The logic to handle user Auto-linking is in the flow action "Virtual Agent - MS Teams Adapter Auto Link Account", following above docs link you can find the flow action name in the "Automatic link action" field of the sys_cs_provider record. https://www.servicenow.com/docs/bundle/zurich-conversational-interfaces/page/administer/virtual-agent/concept/va-adapter-autolinking.html The userPrincipalName of the MS Teams user MUST be matching with the email address of the sys_user record in ServiceNow. The below error clearly tells us what is happening here. "VAMSTeamsAdapterAutoLinkAccount :: Autolinking - Cannot find User in Servicenow with UserPrincipalName - Email - " in the system log and my account is not linked". Even after Confirming the UPN in ms teams matches with email in servicenow, we need to check the below configurations: Please check these settings: 1.The error message above is the response received from Microsoft when the instance tries to communicate with the bot using the Application (Client) ID but Azure cannot find the bot in the bot framework. This is because in the Azure portal the application is created in single tenant. 2. The Token URL specified in the application registry in the instance for the single/multi-tenant. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } For Issue 1: Ensure the Bot Tenancy in Azure Portal matches the value in dev.botframework.com dev.botframework.com Select Bot Name -> Settings -> Scroll down to "Configurations" Azure Portal Applications Select Bot Name -> Authentication -> Supported account Types For Issue 2 : In the App registry, Check the record like : sample-msteams-oauth-xxxxxxxxxx" for the related record, Please check the token URL ->For single tenant bots, auth request should go to https://login.microsoftonline.com/<<MICROSOFT-TENANT-ID>>/oauth2/v2.0/token ->For multi tenant bots auth request sent to https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token ->Make changes in the APP registry and delete the older tokens in the manage tokens section and try again Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1642138 Please note: ServiceNow has no specific requirement for the bot to be multi tenant or single tenant Details as to why the azure application needs to have the same tenancy configuration as the bot framework will need to come from Microsoft as this is outside of ServiceNow control