Microsoft Teams
Setup Guide
You can find your Microsoft Teams application credentials by visiting the Microsoft Developer Portal for Teams.
You'll need the following information to set up your Microsoft Teams app with Paragon Connect:
App ID
Bot Client ID
Bot Client Secret
Scopes Requested
Prerequisites
A Microsoft Azure account
A bot registered in the Microsoft Developer Portal for Teams (See Creating a Microsoft Teams bot for setup instructions)
Creating a Microsoft Teams bot
You will need to create a bot user in the Microsoft Developer Portal for Teams to build your integration.
Log in to the Developer Portal for Teams using the same Microsoft account that you use to log in to the Microsoft Azure Portal.
Navigate to Tools in the sidebar.
Select Bot Management.
Click New Bot and provide a name for your bot. This is not the name that appears to your users; we recommend appending "(Bot)" to the name for clarity.
Next, you will need to associate this new bot with your Teams application.
In the Developer Portal for Teams, navigate to Apps in the sidebar.
If you do not have a Teams app yet, click New app and provide a name. This name will be the one displayed in the Microsoft Teams store and to your users.
In Basic information, you will need to minimally provide a short description and URLs for your application's website, Privacy Policy, and Terms of Use.
Click Save below.
In your Teams app settings, navigate to App features (under the Configure section).
Select Bot.
Select the bot user you created above.
Check any applicable capabilities for your bot user.
Click Save below.
Optionally, upload an icon for your app in Branding.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MCJwlyhqtCdBfCLUO0d-1223115691%252Fuploads%252FKerZorc6WK9rBMkMZJha%252Fimage.png%3Falt%3Dmedia%26token%3D9fd9918c-d44c-4377-b439-62cce6d637f5&width=768&dpr=4&quality=100&sign=894cab26&sv=1)
Testing your Microsoft Teams bot
If your application is not yet published to the Microsoft Teams store, you can test your app by uploading your app's package directly into your Teams account.
In the Developer Portal for Teams, navigate to your list of Apps.
Click the triple-dot menu in your app's row and click Download app package. Your app's package will be downloaded as a .zip file.
Log in to Microsoft Teams with the account you would like to test your bot in.
Click Apps in the left sidebar (one of the last options):
Click Manage your apps (at the bottom of the App categories sidebar).
Click Upload an app and Upload your app to your org's app catalog.
Select the .zip file with your app's package. After a successful upload, you will be navigated to the "Built for your org" page.
Select the name of your app in the list.
Click Add and Add to a team.
Select a team and channel to add your bot.
Add the Redirect URL to your Microsoft Teams app
Paragon provides a redirect URL to send information to your app. To add the redirect URL to your Microsoft Teams app:
Copy the link under "Redirect URL" in your integration settings in Paragon. The Redirect URL is
https://passport.useparagon.com/oauth
Log in to the Microsoft Azure Portal using your Microsoft account.
Navigate to All Services > App Registrations and select the app registration representing your bot, not your Microsoft Teams app. You can check to make sure that the ID matches the one you selected for your associated bot: In Developer Portal for Teams > [Your App] > App Features:
In Azure Portal > App Registrations:
Select Authentication from the sidebar.
Under Platform configurations, press the "Add a platform" button.
Select the Web platform.
Paste the Redirect URL from Step 1 under Redirect URIs.
Press the Save button at the top of the page.
Generate a Client Secret
Since Microsoft Teams does not automatically provide you with a Client Secret for your application, we'll need to make one. To get your Client Secret:
Navigate to All Services > App Registrations and select the app registration representing your bot, not your Microsoft Teams app. You can check to make sure that the ID matches the one you selected for your associated bot: In Developer Portal for Teams > [Your App] > App Features:
In Azure Portal > App Registrations:
Navigate to Manage > Certificates & secrets in the sidebar.
Under Client Secrets, click the + New client secret button.
Name your client credentials and select an expiry that works best for your application. Press Add to create your credentials.
Copy the displayed Client Secret under the Value column.
Note: You will need to periodically create new and update your Client Secret as they expire for all Microsoft integrations.
Add your Microsoft Teams app to Paragon
1. Select Microsoft Teams from the Integrations Catalog.
2. Under Integrations > Connected Integrations > {YOUR_APP} > Settings, fill out your credentials from the end of Step 1 and Step 2 in their respective sections:
Client ID: Found in the Microsoft Azure Portal, under App registrations > Application (client) ID. This should be the Client ID of the app registration representing your bot, not your Microsoft Teams app.
Client Secret: See Generate a Client Secret.
Bot External ID: Found in the Microsoft Developer Portal for Teams, as the App ID:
Permissions: Select the scopes you've requested for your application.
Press the blue "Connect" button to save your credentials.
Note: You should only add the scopes you've requested in your application page to Paragon.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MCJwlyhqtCdBfCLUO0d%252F-MeXQYTodCbhC7dCkgjp%252F-MeXQmgfxivnqeKZbGUD%252FConnecting%2520your%2520Microsoft%2520Teams%2520application%2520to%2520Paragon%2520Connect.png%3Falt%3Dmedia%26token%3De1859c13-3252-4665-a1d3-2a5b1898ae61&width=768&dpr=4&quality=100&sign=d996b3c7&sv=1)
Connecting to Microsoft Teams
Once your users have connected their Microsoft Teams account, you can use the Paragon SDK to access the Microsoft Teams API on behalf of connected users.
See the Microsoft Teams REST API documentation for their full API reference.
Any Microsoft Teams API endpoints can be accessed with the Paragon SDK as shown in this example.
Building Microsoft Teams workflows
Once your Microsoft Teams account is connected, you can add steps to perform the following actions:
Send message in channel
Send message in chat
When creating messages in Microsoft Teams, you can reference data from previous steps by typing {{
to invoke the variable menu.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MCJwlyhqtCdBfCLUO0d%252F-MdcylBsUn4TjMvD95xQ%252F-Mdd367FMnrjdQzDrKcm%252FSending%2520messages%2520to%2520Microsoft%2520Teams%2520using%2520Paragon%2520Connect.png%3Falt%3Dmedia%26token%3Deaabdebe-061e-466c-a888-5c8d88c11494&width=768&dpr=4&quality=100&sign=35553524&sv=1)
Using Webhook Triggers
Webhook triggers can be used to run workflows based on events in your users' Microsoft Teams account. For example, you might want to trigger a workflow whenever new chats are created in Microsoft Teams to sync your users' Microsoft Teams chats to your application in real-time.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MCJwlyhqtCdBfCLUO0d-1223115691%252Fuploads%252FtIIGuBEIAWQ6re1W5xb6%252FMicrosoft%2520Teams%2520triggers%2520in%2520Paragon%2520Connect.png%3Falt%3Dmedia%26token%3D6363b315-0c8a-45c1-9fa3-d2eb0a21a7e9&width=768&dpr=4&quality=100&sign=a52fde39&sv=1)
You can find the full list of Webhook Triggers for Microsoft Teams below:
Channel Created
Chat Created
Chat Updated
Last updated