Microsoft Teams Connection
The Microsoft Teams connection type enables automations to send messages, create channels, and interact with Teams resources through the Microsoft Graph API. It is used by the plugin-microsoft plugin, which delegates to the microsoft-connector.
Connection Type
| Property | Value |
|---|---|
| Type enum | MICROSOFT_TEAMS |
| Type ID | microsoft-teams |
| Category | Enterprise Apps |
| Connector class | MSTeamsConnectionDetails |
Friendly Example
| What you enter | Example |
|---|---|
| Connection name | Teams - Operations Alerts |
| Used for | Posting alerts and summaries into a Microsoft Teams channel |
| Main details to collect | Webhook URL or app credentials and target channel details |
| Best person to provide it | Microsoft Teams administrator |
After it is saved, workflow builders select Teams - Operations Alerts in a node instead of entering these details again.
Mandatory Fields
| Field | Type | Required | Description |
|---|---|---|---|
tenantId | String | Yes | Azure AD tenant ID (a GUID). Found in Azure Portal under Azure Active Directory > Overview. |
clientId | String | Yes | Application (client) ID of the registered Azure AD app. |
clientSecret | String | Yes | Client secret value for the app registration. Encrypted at rest. |
Advanced Fields
| Field | Type | Required | Description |
|---|---|---|---|
graphBaseUrl | String | No | Override the Graph API base URL. Defaults to https://graph.microsoft.com/v1.0. |
grantType | String | No | OAuth 2.0 grant type. Defaults to client_credentials. Use password for ROPC flow (not recommended). |
username | String | No | User principal name. Required only when using the password grant type. |
password | String | No | User password. Required only when using the password grant type. Encrypted at rest. |
Azure AD App Registration
-
Navigate to Azure Portal > Azure Active Directory > App registrations > New registration.
-
Name the application (e.g.,
Qinfinite Automation - Teams). -
Supported account types: Select "Accounts in this organizational directory only".
-
Register the application. Copy the Application (client) ID and Directory (tenant) ID.
-
Create a client secret:
- Go to Certificates & secrets > New client secret.
- Set an expiration period appropriate for your security policy.
- Copy the secret Value immediately.
-
Configure API permissions:
- Go to API permissions > Add a permission > Microsoft Graph.
- Add the following Application permissions:
| Permission | Purpose |
|---|---|
ChannelMessage.Send | Send messages to Teams channels |
Channel.ReadBasic.All | List channels in a team |
Team.ReadBasic.All | List teams the app has access to |
Chat.Create | Create one-on-one or group chats |
ChatMessage.Send | Send messages in chats |
User.Read.All | Resolve user identities for mentions and chat creation |
- Grant admin consent by clicking Grant admin consent for [tenant].
Some Teams Graph API operations (like sending channel messages as an application) require the app to be installed in the target team. Use the Teams App Installation API or install the app manually through the Teams admin center.
Authentication Flow
The connector authenticates using the OAuth 2.0 Client Credentials grant:
- Requests a token from
https://login.microsoftonline.com/\{tenantId\}/oauth2/v2.0/token. - Token is scoped to
https://graph.microsoft.com/.default. - Calls Graph API endpoints with the Bearer token.
The token is acquired on each request (or cached by the underlying HTTP client). No user interaction is required.
Troubleshooting
| Symptom | Likely Cause |
|---|---|
AADSTS7000215: Invalid client secret | The client secret has expired or was not copied correctly |
403 Forbidden when posting a message | Missing ChannelMessage.Send permission, or admin consent not granted |
404 Not Found for a team or channel | The team/channel ID is incorrect, or the app has not been installed in that team |
UnknownError with 502 status | Transient Graph API issue. Retry the operation. |