Tutorial: Get started with Microsoft Teams
To get started using AWS Chatbot to help manage your AWS infrastructure, follow the steps below to set up AWS Chatbot with chat rooms and Amazon SNS topic subscriptions. Note that AWS Chatbot is approved by your Microsoft Teams administrator.
Topics
Prerequisites
Before you get started, make sure you've completed the tasks in Setting up AWS Chatbot. You should also ensure Microsoft Teams is installed and approved by your organization administrator. You will need to choose a permissions scheme in the following procedure. This scheme determines the permissions your channel members will have and what AWS Chatbot can do on your behalf. For more information about AWS Chatbot permissions, see Understanding permissions You must also create or choose a channel to be used in your AWS Chatbot configuration. This channel is used to monitor and operate your AWS resources.
Note
The following IAM permissions are required to create a Microsoft Teams configuration:
GetMicrosoftTeamsOauthParameters
RedeemMicrosoftTeamsOauthCode
CreateMicrosoftTeamsChannelConfiguration
If you have less than administrative permissions, ensure you have the aforementioned permissions to create a configuration.
Step 1: Configure a Microsoft Teams client
To allow AWS Chatbot to send notifications or run commands in your Microsoft Teams channel, you must configure AWS Chatbot with Microsoft Teams.
To configure a Microsoft Teams client
-
Add AWS Chatbot to your team:
In Microsoft Teams, find your team name and choose ..., then choose Manage team.
Choose Apps, then choose More apps.
Enter
aws
in the search bar to find AWS Chatbot.Select the bot.
Choose Add to a team and complete the prompt.
-
Open the AWS Chatbot console at https://console.aws.amazon.com/chatbot/
. -
Under Configure a chat client, choose Microsoft Teams, then choose Configure client.
-
Copy and paste your Microsoft Teams channel URL.
Tip
Your channel URL contains your tenant, team, and channel IDs. You can find your channel URL by right clicking on the channel in your Microsoft Teams channel list and copying the link. Your channel ID is the portion of your channel URL after the path
/channel/
, starting with19%3
and likely ending with eitherthread.tacv2
orthread.skype
.For example, the bolded portion of the following channel URL is its channel ID:
https://teams.microsoft.com/l/channel/19%3Ae5eace25j32023jga835103358eapge3t8235%40thread.tacv2/ChannelName?groupId=0d36500a-6023-419c-8c36-7e21f19b0135&tenantId=5fe61832-9f46-403b-a7db-cf9cf2e38199
. -
Choose Configure.
Note
After choosing Configure, you'll be redirected to Microsoft Team's authorization page to request permission for AWS Chatbot to access your information. For more information, see Chat client application permissions for AWS Chatbot.
-
On the Microsoft Teams authorization page, choose Accept.
Step 2: Configure a Microsoft Teams channel
To allow AWS Chatbot to send notifications or run commands in your Microsoft Teams channel, you must also configure AWS Chatbot with a Microsoft Teams channel. Channel configuration consists of:
-
Associating a channel with the configuration
-
Defining user permissions, which dictate what tasks users can perform in a channel
-
(Optional) Adding Amazon SNS topics, which AWS Chatbot uses to send notifications to your channel
Note
Microsoft Teams doesn't currently support AWS Chatbot in private channels.
For more information, see Private channel limitations
To configure a Microsoft Teams channel
-
Associate a channel with your configuration:
-
On the Team details page in the AWS Chatbot console, choose Configure new channel.
-
Under Configuration details, enter a name for your configuration. The name must be unique across your account and can't be edited later.
-
If you want to enable logging for this configuration, choose Publish logs to Amazon CloudWatch Logs. For more information, see Amazon CloudWatch Logs for AWS Chatbot.
Note
There is an extra charge for using CloudWatch Logs.
-
For Team channel, paste your Microsoft Teams channel URL.
-
-
Define user permissions:
-
Choose your Role Setting.
Tip
Your role setting dictates what permissions your channel members have. A channel role gives all members the same permissions. This is useful if your channel members typically perform the same actions in Microsoft Teams. A user role requires your channel members to choose their own roles. As such, different users in your channels can have different permissions. This is useful if your channel members are diverse or you don’t want new channel members to perform actions as soon as they join the channel. For more information, see Role setting.
-
Select the policies that will make up your channel guardrails. Your channel guardrails control what actions are available to your channel members. Add AmazonQDeveloperAccess as a channel guardrail to allow your users to use Amazon Q in your Microsoft Teams channel.
-
-
(Optional) Add Amazon SNS topics:
Note
If you want to receive notifications in your Slack channel, complete these steps.
-
Choose your notification settings:
-
For SNS Region, choose the AWS Region that hosts the SNS topics for this AWS Chatbot subscription.
-
For SNS topic, choose the Amazon SNS topic for the client subscription. This topic determines the content that's sent to the Microsoft Teams channel. If the region has additional SNS topics, you can choose them from the same dropdown list. The SNS topics you choose must be configured in the services for which you want to receive notifications. For more information, see Monitoring AWS services using AWS Chatbot.
-
To add an Amazon SNS topic from another AWS Region to the notification subscription, choose Add another Region.
Note
For a tutorial on subscribing existing Amazon SNS topics to AWS Chatbot, see Tutorial: Subscribing an Amazon SNS topic to AWS Chatbot.
Notifications from supported services that publish to the chosen Amazon SNS topics will now appear in the Microsoft Teams channel.
-
-
-
Choose Configure.
Note
You can configure a Microsoft Teams channel to run commands to your AWS account. For more information, see Running AWS CLI commands from chat channels.
You can configure as many channels with as many topics as you need.
If you want to allow AWS Chatbot to answer questions about your AWS resources, turn on AWS Resource Explorer in the Resource Explorer Console. For more information, see Getting started with Resource Explorer in the AWS Resource Explorer User Guide.
Step 3: Test notifications from AWS services to Microsoft Teams
To verify that an Amazon Simple Notification Service (Amazon SNS) topic sends notifications to your Microsoft Teams channel, you can test your setup by sending a notification. Ensure your AWS Chatbot configuration is subscribed to at least one Amazon SNS topic and that your topics are assigned to a service supported by AWS Chatbot. For a list of supported services, see Monitoring AWS services using AWS Chatbot. You can also test notifications by using CloudWatch. For more information, see Test notifications from AWS services to Microsoft Teams using CloudWatch.
Testing notifications with configured clients
Open the AWS Chatbot console
. Choose the configured client you want to test.
In the configured client, choose the channel to send a test notification to.
Choose Send test message.
View the confirmation message at the top of the screen that shows a message was sent to your Amazon SNS topic.
Confirm the test message in your Microsoft Teams channel.
Configuring Microsoft Teams channels using AWS CloudFormation
You can automate Microsoft Teams channel configuration by using an AWS CloudFormation template. To use an AWS CloudFormation template, you need the Team ID and Tenant ID found under Team details in the AWS Chatbot console. For more information, see AWS::Chatbot::MicrosoftTeamsChannelConfiguration in the AWS CloudFormation User Guide.
Next steps
After you configure your chat clients and test that your notifications are working, you might want to explore some of the following topics:
-
Learn about which other AWS services you can integrate with AWS Chatbot in Monitoring AWS services using AWS Chatbot.
-
Learn about what you can customize using AWS Chatbot in Customizing AWS Chatbot.
-
Learn about what actions you can perform using AWS Chatbot in Performing actions.
-
Learn what questions you can ask AWS Chatbot and Amazon Q in Asking questions from chat channels in AWS Chatbot.
-
Learn how to receive AWS CodeStar notifications in your channels in Tutorial: Receive Developer Tools notifications in Microsoft Teams.