All Collections
Authentication guides
Microsoft Teams Bot Authentication Guide
Microsoft Teams Bot Authentication Guide

How to authenticate Microsoft Teams Bot for use with Tines

Daniel Stoeski avatar
Written by Daniel Stoeski
Updated over a week ago

First, create a Microsoft Teams Bot 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 "OAuth 2.0"

  4. Copy the "Callback URL"

Next, create an Microsoft Teams App and Bot

  1. In Microsoft Teams, ensure you have the Developer Portal App installed

  2. Open the "Developer Portal" app, click on "Apps" and then "+ New app"


  3. Name the app and click "Add"

  4. Fill out all the required fields and click "Save"

    1. Required fields: Short Description, Long Description, Developer Name, Website, Privacy Policy, Terms of Use, Application Client ID (should be the same as your App ID)



  5. Copy the "App ID" which you will need

  6. Next, navigate to "Tools" and then click "Bot management"


  7. Click "+ New Bot"


  8. Name the bot and click "Add"

  9. Navigate to "Configure" and paste the URL of webhook action into the "Bot endpoint address" to interact with the bot


  10. Navigate to "Client secrets" and click "Add a client secret for your bot"


  11. Copy the client secret and click "OK"


  12. Click on the "Azure" link to be taken to the "App registrations" page in your Azure Portal.


  13. In the Azure Portal, search for your bot and click on it


  14. In the "Essentials" section, copy your "Application (client) ID" and then click "Add a Redirect URI"


  15. Under, "Platform configurations" and click "Add a platform"


  16. Click "Web"


  17. Paste the "Callback URL" into the "Redirect URIs" field you copied from your credential in Tines, and then click "Configure"


  18. You should now see the Web platform show under "Platform configurations"


  19. Back in Teams, navigate to the "Developer Portal" app and click "Apps"


  20. Select your app, click "App features" and then "Bot"


  21. Select your bot from the "Select an existing bot" dropdown list and add the scopes "Personal", "Team" and "Group Chat", then click "Save"


  22. Click "Publish"


  23. Click "Publish to your org"


  24. Click "Publish your app" and you will see your app's "Version" and "Status"



  25. Navigate (or ask your Teams Admin) to the Manage Apps section of the Teams admin center and find your app using the "Search by name" field


  26. Click on your app and then click "Publish"


  27. Click "Publish". You will see a confirmation message stating it may take a few hours for the app to appear.


  28. Back in Teams, navigate to the "Built for your org" section under "Apps"


  29. Click on your app and click "Add" and choose "Add to a team"


  30. Type the name of the channel where the app will be added and click "Set up a bot"


  31. Navigate to the channel and click the ellipsis (...) and then "Get link to channel"


  32. Click "Copy" and paste the link into a text editor

  33. Find the channel ID between channel/ and the next / in the link and copy the ID

Next, finish creating the Microsoft Teams Bot credential in Tines

  1. Input the values for the Microsoft Teams Bot credential

    1. Name: Required

    2. Description: Optional

    3. Client ID: The "Application (client) ID" of your bot

    4. Client secret: The "Client secret" of your bot

    5. Scope: https://api.botframework.com/.default

    6. OAuth Provider: Manual

    7. Grant type: Client credentials

    8. OAuth token URL: https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token

  2. Optional

    1. Domains: Ensure this credential can only be used when making HTTP requests to specific domains

    2. Access: What other teams can also use the API

  3. Click "Save"

Your credential should look like the following:

Lastly, create Microsoft Teams Bot resources in Tines

You will need to create two resources:

  • Microsoft Teams channel ID

  • Microsoft service URL

  1. Navigate to the team that will be using the API and click "Resource"

  2. Click "+ New Resource"

  3. Input the values for the Microsoft resource

    1. Name: Microsoft Teams channel ID

    2. Description: Optional

    3. Builder: The channel ID you copied earlier

  4. Optional

    1. Access: What other teams can also use the resource

  5. Click "Save resource"

  6. In Resources, click "+ New Resource"

  7. Input the values for the Microsoft resource

    1. Name: Microsoft service URL

    2. Description: Optional

    3. Builder: Your Microsoft service URL, which will vary depending on region and is set by the channel or user location

  8. Optional

    1. Access: What other teams can also use the resource

  9. Click "Save resource"

Your resources should look like the following:

For more on creating credentials in Tines, click here.

You can find a selection of Microsoft Teams stories in the story library

Using the credential and resources in an action

Here is an example Microsoft Teams action you can copy and paste onto your storyboard in Tines:

{"standardLibVersion":"35","actionRuntimeVersion":"4","agents":[{"disabled":false,"name":"Fetch Team Roster","description":"MS Teams fetch team list","options":"{\"url\":\"https://<<RESOURCE.microsoft_service_url>>/v3/conversations/<<RESOURCE.microsoft_teams_channel_id>>/members\",\"content_type\":\"json\",\"method\":\"get\",\"headers\":{\"Authorization\":\"Bearer <<CREDENTIAL.msteamsbot>>\"}}","position":{"x":870,"y":1080},"type":"httpRequest","timeSavedUnit":"minutes","timeSavedValue":0,"monitorAllEvents":false,"monitorFailures":false,"monitorNoEventsEmitted":null,"recordType":null,"recordWriters":[],"form":null,"cardIconName":"httpRequest","createdFromTemplateGuid":"56ae7e3123ae1262561544b398b55ef009c2b3b02acf7f5f9aa3402e99bdd0a1","createdFromTemplateVersion":null,"originStoryIdentifier":"cloud:aa47f8215c6f30a0dcdb2a36a9f4168e:d4c15df0f02ba4789095426607003199"}],"links":[],"diagramNotes":[]}
Did this answer your question?