N O T I C E


MSPbots WIKI is moving to a new home at support.mspbots.ai to give you the best experience in browsing our Knowledge Base resources and addressing your concerns. Click here for more info!


How to connect Microsoft Teams to MSPbots:

1. Sync Teams to MSPbots


The procedure for authorizing the sync should be done by someone with AAD admin permission. 

To sync MS Teams to MSPbots, connect your AAD (Teams) from the Integrations (mspbots.ai) section of the MSPbots app. Click the Sync button to connect. 

2. Authorize AD background sync permission 


Information needed and why we need it

The MSPbots app requires permission to sync user information like managers, positions, and avatar pictures, including any change in user data from AAD in the future. The sync happens in the background and updates user information regularly. This eliminates the need for manually syncing data whenever employees get on board or go offboard.

  • User name and email address - Used to identify users and map their email addresses with the PSA user accounts.
  • Managers' info - Used by the bots to alert the managers every time users are not in compliance with the company's policies or procedures.
  • Job title - Used to automate the dashboards related to job titles and to trigger bots that apply to specific job titles.
  • Avatar picture - Makes it easier to identify users on the list and adds to a better user interface.


API call for obtaining user information

Here is the API call that we use to get the user information:

  1. https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http
  2. https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http

This step is done by an AAD admin. If you are not an AAD admin, please add one of your AAD administrators as MSPbots admin and let them log in to finish this step.

3. Install MSPbots App in MS Teams


The MSPbots Teams App is needed for users to receive MSPbots notifications and send commands to MSPbots. There are two ways to get it installed:

4. Common Errors


This is a list of the errors commonly experienced by MSPbots clients when connecting MS Teams. 

Error message: "The app may not exist, or your organization may have disallowed you from using it"


To resolve this, please refer to Microsoft's guide on Managing app permission policies in Microsoft Teams


Error "c9a921d7-2b75-4a7f-96a4-649fb3250a68" on Teams integration logs


The client experiences sync error for some APIs like the following:  

error in Teams logs

Root Cause:

The error appears because the permissions given to MSPbots are not enough. You have to authorize Managed.Tenants.Read.all on the Permissions List.

The MSPbots logic configuration supports multiple clients. We create datasets for each client according to their requirements and the permissions they have granted MSPbots. These datasets are accessible to all clients using MS Teams. However, because datasets vary for each client and require different permissions, clients may not be able to access some datasets until they provide the same permissions given by the client who requested the datasets. 

Resolution: 

We have upgraded our configuration logic. Now, data from APIs with the correct client permissions sync automatically. On the other hand, those with insufficient permissions are marked with a Pending status until clients grant the permissions required by the datasets they want to access. 

How to grant permissions and fix the error:

a. Go to Integrations on the MSPbots app. Find Teams on the Integrations tab then click on Permissions.
Teams permissions 

b. Click Permissions List on the pop-up and select ManagedTenants.Read.All (or the required permissions) and save.

managed tenants permissions

c. Provide Teams administrator authorization by clicking the Sync button. 

sync teams


Error "c10e6250-9996-447b-96a5-96f195e9b022" on Teams integration logs


The following error appears:  

The error affects data sync and appears because XLS has no permission to access Teams data. Resolve by authorizing XLS to access Teams data. 

For information on the permissions required to call the Teams API, please read Microsoft's page for Getting chat Message in a channel or a chat



5. Setup MS Teams Global Policy to push MSPbots to all users


Add MSPbots to Teams Global policy to get the app installed automatically for your current and future AAD users. 

Follow the steps here: Adding MSPbots to the Teams Global Policy



  • No labels