Skip to main content

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

PropertyValue
Type enumMICROSOFT_TEAMS
Type IDmicrosoft-teams
CategoryEnterprise Apps
Connector classMSTeamsConnectionDetails

Friendly Example

What you enterExample
Connection nameTeams - Operations Alerts
Used forPosting alerts and summaries into a Microsoft Teams channel
Main details to collectWebhook URL or app credentials and target channel details
Best person to provide itMicrosoft Teams administrator

After it is saved, workflow builders select Teams - Operations Alerts in a node instead of entering these details again.

Mandatory Fields

FieldTypeRequiredDescription
tenantIdStringYesAzure AD tenant ID (a GUID). Found in Azure Portal under Azure Active Directory > Overview.
clientIdStringYesApplication (client) ID of the registered Azure AD app.
clientSecretStringYesClient secret value for the app registration. Encrypted at rest.

Advanced Fields

FieldTypeRequiredDescription
graphBaseUrlStringNoOverride the Graph API base URL. Defaults to https://graph.microsoft.com/v1.0.
grantTypeStringNoOAuth 2.0 grant type. Defaults to client_credentials. Use password for ROPC flow (not recommended).
usernameStringNoUser principal name. Required only when using the password grant type.
passwordStringNoUser password. Required only when using the password grant type. Encrypted at rest.

Azure AD App Registration

  1. Navigate to Azure Portal > Azure Active Directory > App registrations > New registration.

  2. Name the application (e.g., Qinfinite Automation - Teams).

  3. Supported account types: Select "Accounts in this organizational directory only".

  4. Register the application. Copy the Application (client) ID and Directory (tenant) ID.

  5. 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.
  6. Configure API permissions:

    • Go to API permissions > Add a permission > Microsoft Graph.
    • Add the following Application permissions:
PermissionPurpose
ChannelMessage.SendSend messages to Teams channels
Channel.ReadBasic.AllList channels in a team
Team.ReadBasic.AllList teams the app has access to
Chat.CreateCreate one-on-one or group chats
ChatMessage.SendSend messages in chats
User.Read.AllResolve user identities for mentions and chat creation
  1. Grant admin consent by clicking Grant admin consent for [tenant].
info

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:

  1. Requests a token from https://login.microsoftonline.com/\{tenantId\}/oauth2/v2.0/token.
  2. Token is scoped to https://graph.microsoft.com/.default.
  3. 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

SymptomLikely Cause
AADSTS7000215: Invalid client secretThe client secret has expired or was not copied correctly
403 Forbidden when posting a messageMissing ChannelMessage.Send permission, or admin consent not granted
404 Not Found for a team or channelThe team/channel ID is incorrect, or the app has not been installed in that team
UnknownError with 502 statusTransient Graph API issue. Retry the operation.