Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Configuring a Microsoft Teams plugin for Amazon Q Business

Focus mode
Configuring a Microsoft Teams plugin for Amazon Q Business - Amazon Q Business

Microsoft Teams is an enterprise collaboration tool for messaging, meetings, and file sharing. If you’re a Microsoft Teams user, you can create an Amazon Q Business plugin to allow your end users to send private and public (channel) messages from within their web experience chat.

To create a Microsoft Teams plugin, you need configuration information from your Microsoft Teams instance to set up a connection between Amazon Q and Microsoft Teams and allow Amazon Q to perform actions in Microsoft Teams.

For more information on how to use plugins during your web experience chat, see Using plugins.

Prerequisites

Before you configure your Amazon Q Microsoft Teams plugin, you must do the following:

  • As an admin, create a new OAuth 2.0 Microsoft Teams app in the Microsoft Teams developer console with scoped permissions for performing actions in Amazon Q. To learn how to do this, see Register an application in Microsoft Teams Developer Documentation. Select Accounts in any organizational directly under Supported Account Types.

  • Make sure you've added following required scopes:

    • channelMessage.send

    • chatMessage.send

    • Team.ReadBasic.All

    • Channel.ReadBasic.All

    • Chat.Read

  • Note the domain URL of your Microsoft Teams instance. For example: https://graph.microsoft.com/v1.0.

  • Note your:

    • Access token URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/token.

    • Authorization URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/authorize.

    • Redirect URL – The URL to which user needs to be redirected after authentication. If your deployed web url is <q-endpoint>, use <q-endpoint>/oauth/callback . Amazon Q Business will handle OAuth tokens in this URL. This callback URL needs to be allowlisted in your third-party application.

    • Client ID – The client ID generated when you create your OAuth 2.0 application in Microsoft Teams.

    • Client secret – The client secret generated when you create your OAuth 2.0 application in Microsoft Teams.

    You will need this authentication information during the plugin configuration process.

Service access roles

To successfully connect Amazon Q to Microsoft Teams, you need to give Amazon Q the following permission to access your Secrets Manager secret to get your Microsoft Teams credentials. Amazon Q assumes this role to access your Microsoft Teams credentials.

The following is the service access IAM role required:

{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "secretsmanager:GetSecretValue" ], "Resource": [ "arn:aws:secretsmanager:{{your-region}}:{{your-account-id}}:secret:[[secret-id]]" ] } ] }

To allow Amazon Q to assume a role, use the following trust policy:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "QBusinessApplicationTrustPolicy", "Effect": "Allow", "Principal": { "Service": "qbusiness.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "aws:SourceAccount": "{{source_account}}" }, "ArnLike": { "aws:SourceArn":"arn:aws:qbusiness:{{your-region}}:{{source_account}}:application/{{application_id}}" } } } ] }

If you use the console and choose to create a new IAM role, Amazon Q creates the role for you. If you use the console and choose to use an existing secret, or you use the API, make sure your IAM role contains these permissions.

Creating a plugin

To create a Microsoft Teams plugin for your web experience chat, you can use the AWS Management Console or the CreatePlugin API operation. The following tabs provide a procedure for creating a Microsoft Teams plugin using the console and code examples for the AWS CLI.

Console

To create a Microsoft Teams plugin

  1. Sign in to the AWS Management Console and open the Amazon Q console.

  2. From the Amazon Q console, in Applications, select the name of your application from the list of applications.

  3. From the left navigation menu, choose Actions, and then choose Plugins.

  4. For Plugins, choose Add plugin.

  5. For Add plugins, choose Microsoft Teams.

  6. For Microsoft Teams, enter the following information:

    1. In Plugin name, for Name – A name for your Amazon Q plugin. The name can include hyphens (-), but not spaces, and can have a maximum of 1,000 alphanumeric characters.

    2. In Domain URL, for URL – Enter your Microsoft Teams domain URL. For example, https://graph.microsoft.com/v1.0.

    3. OAuth 2.0 authentication – do the following:

      1. For AWS Secrets Manager secret – Choose Create and add a new secret or Use an existing one. Your secret must contain the following information:

        • Secret name – A name for your Secrets Manager secret.

        • Client ID – The client ID generated when you create your OAuth 2.0 application in Microsoft Teams.

        • Client secret – The client secret generated when you create your OAuth 2.0 application in Microsoft Teams.

        • For Redirect URL – The URL to which user needs to be redirected after authentication. If your deployed web url is <q-endpoint>, use <q-endpoint>/oauth/callback . Amazon Q Business will handle OAuth tokens in this URL. This callback URL needs to be allowlisted in your third-party application.

      2. For Access token URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/token.

      3. For Authorization URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/authorize.

    4. Service access – Choose Create and add a new service role or Use an existing service role. Make sure tha your service role has the necessary permissions.

  7. Tags – optional – An optional tag to track your plugin.

  8. Choose Save.

AWS CLI

To create a Microsoft Teams plugin

aws qbusiness create-plugin \ --application-id application-id \ --display-name display-name \ --type MICROSOFT_TEAMS \ --server-url https://graph.microsoft.com/v1.0 \ --auth-configuration oAuth2ClientCredentialConfiguration="{secretArn=<secret-arn>,roleArn=<role-arn>,authorizationUrl=<auth-url>,tokenUrl=<token-url>}"

To create a Microsoft Teams plugin

  1. Sign in to the AWS Management Console and open the Amazon Q console.

  2. From the Amazon Q console, in Applications, select the name of your application from the list of applications.

  3. From the left navigation menu, choose Actions, and then choose Plugins.

  4. For Plugins, choose Add plugin.

  5. For Add plugins, choose Microsoft Teams.

  6. For Microsoft Teams, enter the following information:

    1. In Plugin name, for Name – A name for your Amazon Q plugin. The name can include hyphens (-), but not spaces, and can have a maximum of 1,000 alphanumeric characters.

    2. In Domain URL, for URL – Enter your Microsoft Teams domain URL. For example, https://graph.microsoft.com/v1.0.

    3. OAuth 2.0 authentication – do the following:

      1. For AWS Secrets Manager secret – Choose Create and add a new secret or Use an existing one. Your secret must contain the following information:

        • Secret name – A name for your Secrets Manager secret.

        • Client ID – The client ID generated when you create your OAuth 2.0 application in Microsoft Teams.

        • Client secret – The client secret generated when you create your OAuth 2.0 application in Microsoft Teams.

        • For Redirect URL – The URL to which user needs to be redirected after authentication. If your deployed web url is <q-endpoint>, use <q-endpoint>/oauth/callback . Amazon Q Business will handle OAuth tokens in this URL. This callback URL needs to be allowlisted in your third-party application.

      2. For Access token URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/token.

      3. For Authorization URL – For Microsoft Teams OAuth applications, this is https://login.microsoftonline.com/common/oauth2/v2.0/authorize.

    4. Service access – Choose Create and add a new service role or Use an existing service role. Make sure tha your service role has the necessary permissions.

  7. Tags – optional – An optional tag to track your plugin.

  8. Choose Save.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.