How to integrate MS Teams into Botmaker?
In this article, you will learn how to integrate Microsoft Teams into the Botmaker platform.
Estimated reading time: 08 minutes
Microsoft Teams is a unified communication and collaboration platform. It combines chat and video call features, file storage with the possibility of collaborative work, and app integrations. The native integration into the Botmaker platform will enable you to do the following:
- Enhance the work and communication of your teams.
- Create different bots for special use cases.
How to perform the integration?
To perform the integration, access Menu>Configuration>Channels (https://go.botmaker.com/#/integrations/channels) and select Microsoft Teams.
Then click on Connect to start the integration tutorial. You will see the following screen, where you should click Start.
Please note that to connect a bot on Microsoft Teams, you must meet the following requirements:
- Have a Microsoft Teams license and be an account administrator.
- Download the Microsoft Authenticator App on your cell phone. This is required to authenticate your Microsoft Teams account.
- Create an application from within Microsoft Teams. Applications connect to Teams or any other software you use, e.g. Botmaker.
Step 1: Enable the applications
To enable the applications, you have to log in to https://admin.teams.microsoft.com/.
Once there, please go to Teams Apps > Setup Policies.
In Manage policies, select Global and activate Upload custom apps by moving the switch to the ON position**,** as it is shown in the image below
Then, click on the Save button below the screen.
Note: As you complete each step of the tutorial, click Next to proceed with the integration.
Step 2: Create an app
To create a Teams App, you must sign in with your account in the Teams app.
Next, go to the Apps section of the sidebar.** And use the search tool to find the Developer Portal application. Add it or open it.
In the Apps tab, click on Create a new app or + New App if you have already created other apps. Choose a name and click on Add
Step 3: Complete your app details
In the section App details, you must complete a series of steps with mandatory data about your App.
- In Descriptions, complete the fields with *.
- In Developer Information, complete the fields with *.
- In App URLs, complete the fields with * (remember to put the address before the url https://).
- It is not necessary to complete the Application (client) ID*.
Once complete, click Save
- Then go to Configure/Branding in the sidebar and upload the requested images.
Step 4: Create your bot
Continue the integration by following the procedures below:
- Go to Tools, click Bot management and click Create your first bot or +New Bot if you have already created others. Name it and click Add.
Note: Once the bot is created, you will see the name and ID. Copy both and paste them into a notepad. You will need them in the final step.
- You will enter the bot you have created and, in the Configure section, you will have to fill in the Bot Endpoint Address field by pasting the following address: https://go.botmaker.com/rest/msbotfwk. Once pasted, click on Save.
** Step 5: Obtain your Client Secret**
Go to Client Secret in the sidebar and click Add a client secret for your bot.
You will see a code. Copy it to a notepad, as you will need it in the final step.
iguiente
Step 6: Configure your bot
Go back to the Apps tab and select your App. In Configure/App features, select the Bot feature.
Under Identify your bot, select:
Select an existing bot and search for your bot in the list
In What can your bot do? select:
Upload and download files
Under Select the scopes in which people can use this command, select:
Personal
Teams
Then click Save.
Step 7: Publish your bot **
To publish your bot, you will have to do it from the App and from the website. Follow the steps below:
- From the Microsoft Teams App: go to Publish/Public to Org and click on Publish your app.
- Now, access from a browser to: https://admin.teams.microsoft.com/policies/manage-apps
In the screen displayed, you will see that there is an app pending approval. Search for it by the name you gave it in the list below. Click on it.
- A pop-up will open. Check that it is the correct App. Copy the App Id that appears in the details.
Nota: Copy and save the number displayed since you will need it in the final step.
Then click the Publish button and click Publish again when the confirmation message appears.
Step 8: Grant permissions to the bot
To grant permissions to the bot, you must log in to the Azure Portal from this link: https://aad.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps
Once in Azure, select your App.
Go to Manage/API permissions and then click on + Add a permission.
Select the Microsoft Graph API and the Application permissions option. From there, you will have to find and add one by one the following permissions:
- User.Read.All
- TeamsApplnstallation.ReadWriteForUser.All
- Chat.ReadBasic.All
Finally, check the option:
doneGrant admin consent for Botmaker
Step 9: Integrate into Botmaker
Paste the data you copied into the notepad in the previous steps:
- Bot name
- Bot ID
- Client secret
- App ID
Finally, click on +Connect Microsoft Teams
To view the integration details of the Teams accounts you already have connected, go to https://go.botmaker.com/#/integrations/channels, select Microsoft Teams and click Configure.
You’re all set! You have now integrated MS Teams with Botmaker to enhance the work and communication of your teams! Remember to visit our Help Center for more information.
Written by: Botmaker Team
Updated:12/27/2022