Foundation Data & Integrations
Microsoft Teams
Microsoft Teams Notification Setup
1 min
teams notifications allows a teams bot to send outbound notifications directly to a user via microsoft teams it also handles responses, allowing rapid notification and responses from end users this can be used along side any email messaging steps to enable connectivity access the azure portal by going to https //portal azure com/#home https //portal azure com/#home ensure you are in the right tenant, by looking at the top right with your username in the the top search bar, search for azure bot, and select the offering underneath marketplace configure the bot as per the below table once complete, click review + create to continue setting description bot handle a unique handle for the azure bot definition used only within the azure portal as a name will not become the name of the bot in teams (this will be defined elsewhere) name this after your instance to be able to identify it easily subscription this needs to be a valid azure cognitive services subscription select azure subscription 1 (or the appropriate subscription when you have multiple) resource group this needs to be a valid azure cognitive services resource group select default (or the appropriate resource group when you have multiple) data residency currently leave as global pricing the pricing tier to use pricing azure ai bot service | microsoft azure change this to free, via the change plan button type of app needs to be multi tenant because of microsoft authentication requirements creation type leave as ‘create new microsoft app id’ once complete, click create and wait for the deployment process to finish you can tell it’s finished when there’s a go to resource button on the screen, as per the below screenshot click go to resource to configure the newly created bot now, we must configure the bot so it knows how to communicate with the instance do so by clicking settings → configuration in the left hand menu now, open a new browser tab/window and navigate to your servicely instance that you want to connect teams to we need to create a messaging account so the servicely instance and bot can communicate with each other do so by searching for messaging accounts, and clicking new in the list populate the record as per the below table setting description name a memorable internal name not customer facing provider select teams active select yes default select yes manifest id leave blank for now tenant id this can be entered now if you have it and is specific to your tenant app id leave blank for now app secret leave blank for now hit create, and then select copy endpoint url to copy the necessary endpoint to your clipboard in the azure bot configuration, paste the copied endpoint url into the messaging endpoint field on the same screen, in the azure bot configuration, copy the microsoft app id and paste it into the app id field of the messaging account created in step 7 click manage password immediately above the the microsoft api id field so we can create some credentials for servicely to use to communicate with the azure bot click new client secret on this page to generate a new client secret provide a useful description, and leave the expiry at it’s default (6 months) once complete, click add and copy the “value” store it safely for later back within your messaging account in servicely, populate the fields we’ve copied over as below setting description app secret the copied “value” from step 12 to configure this azure bot to be visible within teams, we must add the teams channel do so by clicking ‘home’ (top left corner) select your azure bot under ‘recent’ then click settings → channels menu item in the azure bot configuration, and selecting the microsoft teams channel from the available channels list accept the terms of service, and use microsoft teams commercial for the messaging option click apply and wait for the changes to be saved in order for the bot to perform it’s functions, it needs some additional permissions these are configured within the app registration of the record in azure, search for app registrations in the top menu, and select the service find the app registration that matches the name of your notification bot, select it, and in the left hand menu, find manage → api permissions from the list click add a permission, and add the following permissions microsoft graph → application permissions → appcatalog read all microsoft graph → application permissions → teamsappinstallation readwriteselfforuser all once complete, select grant admin consent for {domain} to give the bot access to those apis now, to publish the bot into your selected tenant, we must add the bot into teams open the teams developer portal in a new tab, navigate to apps → new app, and provide a memorable name for your app e g , your instance name we’ll override this to something user facing in the next step of this guide on the basic information page, populate the following fields hit save once finished setting description short name memorable name from step 17 full name user facing name e g , servicely (instance name) short description user facing short description e g , servicely (instance name) long description user facing long description e g , servicely (instance name) one stop shop from teams developer name enter what you want if you are unsure, use your servicely url website enter what you want if you are unsure, use your servicely url privacy policy enter what you want if you are unsure, use your servicely url terms of use enter what you want if you are unsure, use your servicely url application (client) id paste the app id from the messaging account navigate to app features → bot to configure the specific permissions of the bot in the enter a bot id field, populate the app id from the conversation provider in servicely, and ensure the following permissions have been selected hit save to continue with the configuration navigate to app validation and hit get started to confirm the configuration is correct select all the acknowledgements, and run the validation this will advise if there are any issues with the bot once validated, you can click publish in the top right of the screen, and select publish to your org to make the app available in the teams admin center copy the value in basic information → app id and paste it into the servicely messaging account created earlier to provide a link between the teams bot and servicely it is also important that you also get the manifest id, which can be found in the basic information menu item finally, the app can be approved for installation by navigating to the teams admin center and reviewing the apps that are pending approval in the teams apps → manage apps dialog, search for your app name and select it on the next page, hit publish to make the app available for installation in the your selected tenant once complete, the page should look like the below it should be noted that you can only restrict access to the application after it has been published this can be done the same way any other teams app can be certain users and groups when you are setting this up for testing purposes, please ensure that you restrict access to the application only to the users/groups performing the tests once it has been published, it may take some time (between minutes to hours) to be available, but once it is, the app can now be searched for and installed in your teams (as per any other app) finally, in order for the azure app to correlate users in servicely with their entraid identity, we need to populate the active directory id field of the user records if you are using scim, this is typically already used as the external key for your servicely user records if not, you can find it as the object id in the microsoft entra admin centre for that user