---
sourceDocument: Brazil Conversational Interfaces
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/conversational-interfaces

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Conversational Interfaces

ft:clusterId :

    - convint

bundleId :

    - convint

workflow :

    - Platform


---

# Account linking in pre-built messaging integrations

# Account linking in pre-built messaging integrations {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Account linking in pre-built messaging integrations

Account linking in Virtual Agent integrates users of supported chat or messaging apps with their ServiceNow user profiles.
This authentication allows seamless access to Virtual Agent topics involving ServiceNow records.
Users can either be auto-linked based on matching email accounts or manually link/unlink their ServiceNow accounts during conversations.
Show full answer Show less  

## Key Features

* **Account Auto-Linking:** Available for Conversational Integrations with Slack and Microsoft Teams. When enabled on the Messaging Apps Integration page, users with matching email addresses between their messaging and ServiceNow accounts are automatically authenticated without prompts.
* **Manual Linking and Unlinking:** Users can manually link or unlink their accounts during Virtual Agent conversations using commands like logout. After unlinking, users are prompted to link again or continue as guests.
* **Configuration:** Auto-linking is enabled via the `syscsprovider.list` by selecting the connection record, enabling "Allow account linking," and checking "Auto link users' ServiceNow profiles." An account linking script defines the automatic linking logic using the user's email.
* **Domain Restrictions:** Account linking works only for users within the same domain where Microsoft Teams was installed. To auto-link users from other domains, the Teams installation must be done using the global domain.

## Practical Implications for ServiceNow Customers

By enabling account auto-linking, organizations streamline user authentication in messaging integrations, improving user experience by removing manual linking prompts. This facilitates secure and immediate access to Virtual Agent topics connected to ServiceNow records. Additionally, users retain control to unlink accounts if needed, maintaining flexibility in access management.

Proper configuration ensures that user identities are accurately mapped via email, enabling reliable authentication. Understanding domain limitations helps prevent linking issues in multi-domain environments.  
In Virtual Agent, account linking maps the users of a supported chat or
messaging application to their ServiceNow user profile. Account auto-linking
authenticates your messaging users, which enables users to automatically access Virtual Agent topics that involve ServiceNow records. If needed,
users can also manually unlink from or link to their ServiceNow
accounts.

## How account auto-linking works {#va-adapter-autolinking__section_mm5_t3z_k4b}

In the Conversational Integrations for Slack and Microsoft Teams, you have the option to enable account auto-linking, which automatically links messaging users to their ServiceNow accounts. If you enable the account auto-linking feature on the Messaging Apps Integration page, your users are not prompted to link to their ServiceNow accounts when they engage with Virtual Agent.

In earlier releases, messaging users were prompted to link to their ServiceNow accounts or continue as guests. However, for the Conversational Integrations for Slack and Microsoft Teams, if you enable account auto-linking, users don't manually link their messaging accounts to their ServiceNow accounts, provided that they use the same email account for their messaging and ServiceNow accounts. During auto-linking, Virtual Agent maps the email accounts of messaging users to the email accounts defined in their profiles in the Users \[sys_user\] table. When the email accounts match, the user is automatically linked
(authenticated) and they do not see the Link to ServiceNow button when they begin a bot conversation.

In messaging integrations, your users can still use the logout command during bot conversations to unlink from their ServiceNow accounts. However, in all subsequent conversations after unlinking, Virtual Agent prompts them to link their accounts or continue as a guest user.

## Account auto-linking {#va-adapter-autolinking__section_bth_2mp_kwb}

You can allow a user's third-party accounts to be auto-linked to their ServiceNow® profile.  
You can enable account auto-linking in the sys_cs_provider.list. This feature bypasses the prompt for the users to link their accounts manually.  
Note:  
Account linking is possible only for users who belong to the same domain that was used for installing Microsoft Teams on an instance. To auto-link users from other domains, ensure that Microsoft Teams installation is done using the global domain.

In the navigation filter type <kbd class="ph userinput">sys_cs_provider.list</kbd>. Select the connection record you wish to link. Check the Allow account linking box, then check the Auto link users' ServiceNow profiles box that appears. Fill in the Automatic link action field with the corresponding account linking script.  
Example: Account auto-linking script

    var response_body = inputs['response_body'];
    var status_code = inputs ['status_code'];
    var email_id = '';
    if(status_code>200 && status_code<=210){
        email_id = response_body && JSON.parse(response_body).userPrincipalName;
    }
    var sysUserId = null;

    if(email_id){
        var gr = new GlideRecord("sys_user");
        gr.addQuery("email",email_id);
        gr.query();
        while(gr.next()){
            sysUserId = gr.getUniqueValue();
        }
    }
    if(sysUserId){
        outputs['status'} = 'Success';
        outputs['userid'] = sysUserId;
    }
    else{
        outputs['status'] = 'Failure';
    }

    })(inputs,outputs);

* **[Unlink your ServiceNow user account from a messaging application for Virtual Agent conversations](https://servicenow-prod.fluidtopics.net/4wR5KHsEjU5bLo_OiGMLLQ)**   
  If needed, you can unlink your ServiceNow user account from a messaging app used for the Now Virtual Agent.
* **[Link your ServiceNow user account to a messaging application for Virtual Agent conversations](https://servicenow-prod.fluidtopics.net/8MXpXL7hi9jPqakR0JDL4w)**   
  Link your ServiceNow account to a third-party messaging application to access non-public Virtual Agent topics that use ServiceNow records.

