Creating a Microsoft Teams channel
Updated by Caique Main
Building an Application in Azure
- To create your bot application, go to https://portal.azure.com/ you will need to create an account, if you don't have one.
- After logging into your account, select Create a Resource.
- Search for Azure Bot in the search box.
- Select Azure bot in marketplace.
- Select Create.
- Enter the identifying name for the bot in the identification field.
- Select your signature from the list, by default it will already look like a created signature.
- Select your resource group or create a new one.
- If you want to create a resource group, select Create New, enter the resource name, select OK, and select the required location from the New Resource Group Location drop-down list.
- Select the application type, multi-tenant is recommended. After that, select Review + Create.
- Select Create, if validation is approved. It takes a few moments for your bot service to be provisioned.
- Select Go to resource. Now your application is created!
To create the client secret
- From Settings, select Configuration. Save the Microsoft application ID (client ID) for future reference.
- Select Manage next to Microsoft App ID.
- In the Client Secrets section, select New Client Secret. The Add a Client Secret window appears.
- Enter a Description and a period for the expiration of the secret, then select Add.
- Select Copy to clipboard in the Value column and save the client secret ID for future reference.
- You need to search for one more piece of data that you will need for the creation of the channel on the Weni Platform, to do this, go back to Home and select your bot. Go to Overview on the left menu, then select JSON View. A json will open with some information about your application, look for tenant id and save the value.
To add Microsoft Teams channel
- Go to Home.
- In the Recent Resources section, open your bot.
- Select Channels from the left panel and select Microsoft Teams from the list of available channels.
Set up bot profile
- If you want you can set up the bot profile, to do this, in your bot go to Bot Profile in the menu on the left and set it up as you wish. You can add profile pictures and other information.
To add the Microsoft Teams channel to your bot
- Select the check box to accept the terms of service and select Agree.
- Select Save.
Creating a Channel on the Weni Platform
- After you login to the platform, choose your organization and project, go to Settings.
- Select Add Channel.
- From the channel list, select Teams.
- To connect a channel, you will need the information about the app you created earlier (Bot name, Bot id, App id, App password and Tenant id)
- Enter the name you gave your bot when creating the application in the Bot name field.
- In Bot id enter the Application ID that you saved earlier when creating the application.
- In App id enter the Application ID again.
- In App password enter the Client Secret you created earlier.
- In Tenant id enter the tenant id value you saved earlier.
- Now click Submit.
- Now your channel is created!
- On the channel page that you will be sent to right after you click Submit, you will have the ID of that channel, we will need that value. To get it you can copy the large ID that you will have at the end of the URL of this page. After the read/ copy all this id made up of numbers, letters, and dashes. Save it.
Set Up Endpoint in Application
- Go back to Azure, under Home select your bot in Recent Resources, after that go to Settings in the left menu.
- At **Endpoint ** add the url below, at [CHANNEL ID] add the ID you saved in the previous step.
- https://new.push.al/c/tm/[CHANNEL ID]/receive
- e.g.: https://new.push.al/c/tm/37b755f9-2d97-48fd-8c46-6f0f4d102d16/receive
Setup bot in Teams
- In the lower left corner select Apps.
- Use the search bar on the left and search for App Studio. Select it and install it, then click open.
- Select Create a new App.
- Under App Details, enter all the data you already have such as name.
- Under Identification enter the App ID, under Package name enter a name that references your app e.g.: com.microsoft.teams.devapp
- For version, use something like v1.0.0
- In Description enter a description for your application, tell what it does and who it does it for, for example.
- Under Developer Info enter your company data, such as name and website.
- In Branding, you update the profile images you want your bot to have, click update and choose your images.
- In step 2 under Capabilities, you can set some specifications for your bot, this step is not required for your bot to work together with our platform, so we will skip this step.
- Now in step 3 of the left menu click on Domains and Permissions.
- In Valid Domains enter the domain of our platform so that your bot can integrate with us (https://new.push.al) and click Add.
- In AAD App ID enter your Tenant ID that you saved earlier.
- Now for the last step, click Test and Distribute in step 3 in the left menu.
- You can publish your bot in your organization's catalog, so everyone who participates in your organization can add your bot and send messages to it. To do this, click on Publish app in my organization's catalog and click on Submit.
Important: for your app to be published in your organization's catalog, will have to be accepted by your organization's IT administrator. Once accepted your bot will be available for installation in your company's catalog for all employees that are part of it.