Skip to main content
All CollectionsHow-tosArticlesAuthentication guides
Microsoft Teams Authentication Guide
Microsoft Teams Authentication Guide

How to authenticate Microsoft Teams for use with Tines

Rosie Halpin avatar
Written by Rosie Halpin
Updated over 8 months ago

Microsoft teams allows users to collaborate and communicate in real time within your organization. Connect Tines to Microsoft Teams to create powerful automations that send relevant information to users in Teams.

The below instructions allow users to create a Microsoft Teams application with delegated permissions tied to a user account. For production use, we recommend creating a service account for Tines to link this app to. Depending on your organizational settings, this application may need to be approved by your admin before use. See further details on the application here.

Want to create a custom Microsoft Teams credential? Follow this guide for steps on how to create a Microsoft Graph credential manually and enable your preferred custom scopes.

Create a Microsoft Teams Credential in Tines

  1. Login to your Tines tenant

  2. Navigate to the team that will be using the API and click "Credential"

  3. Click "+ New Credential" and select "Microsoft Teams"

  4. Select an account to authenticate with.

    1. How to select an appropriate account:

      1. The account selected will be tied to the actions of the application. For example, if you select your account and send a message through Tines, the message will appear to be sent from your account. For this reason, we recommend creating a Tines service account to authenticate with. That way, actions created and run from Tines will be appropriately identified as from Tines.

      2. The account will need licenses relevant to the actions you'd like to automate. For example, if you'd like to send messages in Teams, the account will need a Microsoft365 license to send the messages.

      3. The account will need access to relevant teams you'd like to access. If you want to create an automation in Tines that sends messages in a certain teams channel, the account must have access to that teams channel.

    2. Admin approval: depending on the account selected and your organizational settings, you may need to receive admin approval for the Tines application before you can successfully authenticate.

  5. Your credential is created and will appear in Tines. Select the credential to view further details about its associated account and scopes.

Test the Microsoft Teams Credential in Tines

  1. Navigate to your Tines storyboard.

  2. Select 'Templates' and navigate to the templates for 'Microsoft Teams'.

  3. Drag and drop the template 'List all teams' onto the storyboard. You should see your created credential appear at the bottom right of the template builder.

  4. Select 'Run' on the action template.

  5. Select 'Events' to view the results of the action, in this case, to view the list of all teams in your Microsoft Teams organization. Congrats, you have successfully tested your Microsoft Teams credential.

Send a message with the Microsoft Teams Credential in Tines

  1. Within your Tines storyboard, drag and drop the template 'Create a one-on-one chat' onto the storyboard.

  2. Within the template builder, enter the two user IDs or emails to start a chat between. Please note, one of the users must be the account you have associated your Tines Microsoft Teams credential with.

  3. Select 'Run' on the action template. A chat should be created between the two users and the chat ID will be returned in the event data.

  4. Drag and drop the template 'Send simple message in a chat' onto the storyboard and connect the first 'Create a one-on-one chat' template to this one.

  5. Within the template builder of 'Send simple message in a chat', specify the chat ID that was returned from your action in step 3. You can specify this dynamically by referencing the path to the chat ID or hard-code the chat ID into the template.

  6. Select 'Run' on the 'Create a one-on-one chat' template. Tines will now create the chat and then send the message to the created chat.

Microsoft Teams Application Details

The application that users are authenticating with is built by Tines and verified by the Microsoft Partner center. Within your Azure environment, the application can be found under the name 'Tines (Microsoft Teams)'.

Permissions

This application has 8 configured delegated permissions necessary for users to complete most common tasks required in Microsoft Teams, such as sending messages. The scope ChannelMessage.Read.All is a sensitive scope requiring admin permission.

  1. Channel.ReadBasic.All: read the names and descriptions of channels

  2. ChannelMessage.Send: send channel messages

  3. ChannelMessage.Read.All: read a channel's messages

  4. Chat.ReadWrite: read and write user chat messages

  5. Team.ReadBasic.All: read the names and descriptions of teams

  6. TeamsAppInstallation.ReadForUser: read user's installed Teams apps

  7. User.Read: sign in and read user profile (necessary to authenticate)

  8. offline_access: maintain access to data you have given it access to (this prevents you having to sign in each time you want the automation to run).

Frequently Asked Questions

  1. Do I need to get admin approval for the Tines Microsoft Teams application? Yes. Admins can approve the Tines app just once for the organization and then you can create as many Microsoft Teams credentials as desired without needing additional consent. For the scope ChannelMessage.Read.All, this is a sensitive scope and requires admin approval.

  2. Does the account I authenticate with for my Tines Microsoft Teams credential need to have admin permissions? No, the account associated with the credential does not need to have admin permissions. Once the Tines application has been approved by your admin, you can associate the created credential with any account of your choice. We recommend associating with an account that clearly denotes Tines is connected and performing actions to avoid confusion.

  3. What if I want my Microsoft Teams app to have more permissions or functionality than the Tines managed application has? You can create an application with custom permissions for your organization as well. Follow this guide for steps on how to create a Microsoft Graph credential.

Read more about our connect flows here.

Did this answer your question?