- About the Microsoft Teams connector
- Microsoft Teams authentication
Microsoft Teams authentication
Prerequisites
To be able to create a connection, you need to provide the following credentials:
- OAuth Scope
- Your Microsoft username and password
The OAuth Scope required for login represents the default scopes for regular
user operations, such as: Team.Create Channel.Create
ChannelMember.ReadWrite.All ChannelMessage.Send Chat.ReadWrite
ChannelMessage.Read.All Calendars.ReadWrite
.
You can add or remove scopes to customize user permissions for your connection. For details regarding scopes, see the Microsoft Graph permissions reference.
Additionally, you must grant permissions to third party apps to access your information.
Grant permissions to third party apps
Before establishing the connection, make sure permissions are granted for integrated apps from the admin center:
- Log in to the Microsoft 365 admin center.
-
Go to Settings and select Org settings.
-
Under the Services tab, select User consent to apps.
-
Make sure the Let users provide consent when apps request access to your organization's data on their behalf checkbox is enabled and select Save.
Add the Microsoft Teams connection
To create a connection to your Microsoft Teams instance, you need to perform the following steps:
- Select Integration Service from Automation Cloud.
-
From the Connectors list, select Microsoft Teams.
You can also use the search bar to narrow down the connector.
- Select the Add connection button.
-
You are now redirected to the connection page. Enter the OAuth Scope and click Connect.
- You are redirected to the Microsoft login page where you must provide your username and password.
- Your connection has been added.
For more information about authenticating in Microsoft Teams, see the Microsoft Authentication and authorization page.
Microsoft Teams Privileges and Permissions
You can use this connection to enable the Microsoft Teams activities package in UiPath Studio to build automations for user and channel management, messaging, and other ways of working together. The various permission-based use cases that can be achieved are as follows:
Scope/Permission |
Usecase | Activity/Event |
openid (Required) |
By using this permission, an app can receive a unique identifier
for the user in the form of the sub claim. The permission also gives
the app access to the UserInfo endpoint. The
openid scope can be used at the Microsoft
identity platform token endpoint to acquire ID tokens. The app can
use these tokens for authentication
|
N/A |
offline_access (Required) |
The offline_access is a scope required to receive refresh token in the authentication request endpoint. When you redeem an authorization code in the OAuth 2.0 authorization code flow without offline_access scope, you will not receive refresh token from the /token endpoint. | N/A |
profile (Required) |
Retrieving the current user profile such as name, username, email etc. so that it could be used as default/authenticated user at the connection creation and in certain activities | N/A |
email (Required) |
Allows the app to read all your users' primary email addresses, for sending messages or inviting them to a channel |
Send Individual Chat Message Invite Member to Channel Invite User to Team |
User.Read (Good to have) |
Allows users to sign-in to the app, and allows the app to read the profile of signed-in users. It also allows the app to read basic company information of signed-in users | Get Record → Me |
Team.Create |
Create a team for inviting and engaging the respective users | Insert Record → Teams |
Team.ReadBasic.All |
Retrieve the list of teams to be selected in the activities such as sending a channel message etc. |
Create Channel List All Channels Send Chat Message Send Individual Chat Message Invite Member to a Channel Reply to a Channel Message Send Channel Message Get Team by Name |
TeamMember.ReadWrite.All |
Add member to a team on behalf of the signed-in user Retrieve the list of members of a team |
List All Team Members Invite User to Team Insert Record → Teams members List All Records → Teams members |
Channel.Create |
Create a channel (standard/private) for inviting and engaging the respective users of the team | Create Channel |
Channel.ReadBasic.All |
Retrieve the list of channels of a team to be selected in the activities such as sending a channel message etc. |
Invite Member to a Channel Get Channel by Name Reply to Channel Message Send Channel Message |
ChannelMember.ReadWrite.All |
Add member to a channel on behalf of the signed-in user Retrieve the list of members involved in a channel |
Invite Member to a Channel List All Records → Teams channels members |
ChannelMessage.Send |
Send a message in a channel. Also, reply to a message in a thread, if needed. Optionally, I would like to send attachments/media links with my messages. |
Reply to Channel Message Send Channel Message |
ChannelMessage.Read.All |
Allows the app to read all channel messages in Microsoft Teams, without a signed-in user This is also used to trigger events whenever a message is posted in the channel or whenever a keyword is mentioned in the channel |
Reply to Channel Message List all Channel Messages List All Records → Teams channels messages When a message posted in channel (Future) When a keyword or username is mentioned in channel (Future) |
Chat.ReadWrite |
Allows the app to read and send your 1:1 Allows the app to read and send group chat messages This is also used to trigger events whenever a chat message is posted |
Send Group Chat Message Send Individual Chat Message List All Chat Messages List All Records → Chats When a chat message is posted (Future) |
ChatMember.ReadWrite |
Add member to a chats on behalf of the signed-in user Retrieve the list of members involved in a chat |
Insert Record → Chats members List All Records → Chats members |