MS Teams : Common Issues with Auto-linkingAuto-linking flow is executed only when a new user sends a message for the very first time from MS Teams. A 'Channel User Profile' record is kept on our end to identify if the user is new and sending their first message. If we see a user for the first time, we identify them by their MS Teams user id, which is saved in ServiceNow. So, the auto linking flow will be executed ONLY if we are unable to identify the user. The 'Automatically link ServiceNow user profiles' option is visible on the 'Messaging Apps Integration' page starting from QP2. An MS Teams provided API (Get single member details) is used which requires the MS Teams user id and gives us other information about the user such as user's email id for their MS Teams account. Search for the user in the SN sys_user table with this email. If it is found, you can link the user to ServiceNow by creating an entry in the provider_user_map that associates the user’s MS Teams user ID with our ServiceNow user ID. Reference: Account linking in pre-built messaging integrations Prerequisites for automatic linking to work before user starts the conversation: 1. Ensure that the 'Automatically link ServiceNow user profiles' option is checked on the 'Messaging Apps Integration' page. 2. Ensure that the email address of the user in ServiceNow is updated same as the Teams(tenant) email Id. Possible points of failure: The email address of the user in ServiceNow is updated AFTER the user had already sent their first request to MS Teams. Therefore, at the time of the first request, we will not find any sys_user associated to this email, causing auto link to fail. Any further requests from this point on, auto linking flow will not be executed as an active channel user profile already exists by now.The user sent a request to MS Teams before auto-linking was enabled and a channel user profile is created for the first request when auto linking was disabled. Even after enabling it, auto-linking will not work for this user as again there is an already existing channel user profile record. Workaround: Clear the records of sys_cs_channel_user_profile and provider_user_map tables so that the MS Teams user can be identified as a NEW USER by the bot and autolinking flow gets triggered again.