- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
6m ago
This guide covers the setup for connecting a ServiceNow instance to Microsoft Teams with your own app, the self-configured path, so the Notify connector can make calls. (Related ServiceNow Docs). In several places the current Microsoft and ServiceNow screens differ from what the docs describe, and those places are marked UI differs from docs.
Before you begin
- Roles:
- Microsoft Teams admin and Microsoft Azure admin for Parts A and B.
- oauth_admin and admin on the ServiceNow instance for Part C.
- Plugins: Install and activate below on the ServiceNow instance.
- Incident Communications Management (com.snc.iam)
- Incident Management – Major Incident Management (com.snc.incident.mim)
- Notify (com.snc.notify)
- Microsoft Teams Communications spoke (sn_msteams_com_spk)
- Azure Active Directory User Mapping (sn_now_azure)
- Notify Connector for Microsoft Teams (sn_notify_msteams)
- Keep a notes file open. You'll copy the Bot ID, client secret, Application (client) ID, Directory (tenant) ID, and service user Object ID along the way. The client secret is shown only once.
Part A - Microsoft Teams Developer Portal
A1. Create the app
- Sign in to the Teams Developer Portal (https://dev.teams.microsoft.com).
- GCC tenants: the Developer Portal for GCC is only available from inside the Microsoft Teams client, so create the app there.
- Go to Apps > New app, enter a name in the Add app pop-up, and select Add.
- Go to Configure > Basic information.
- UI differs from docs: The docs say an App details page opens. It doesn't. You land on the app overview and have to open Basic information yourself.
- Fill in the fields:
- UI differs from docs: The docs' example short name, ServiceNow for Notify Microsoft Teams, is longer than 30 characters and won't save.
- The App ID on this page belongs to the Teams app. It is not the Bot ID you'll use later.
-
Field Value Short name Your app's name, 30 characters max. Example: ServiceNow Notify for Teams Full name Full name of the app Short / Long description A description of the app Version e.g. 1.0 Developer or company name Your organization Website, Privacy policy, Terms of use Your organization's URLs
- Select Save
A2. Create the bot (Notify connector)
- Go to Configure > App features, select Bot, then Create a new bot.
- Select New Bot, enter a name in the Add bot pop-up, and select Add.
- Copy the Bot ID. It becomes the Client ID used everywhere else. You can copy it from the browser URL or from Bots > Tools.
- Go to Channels, enable Microsoft Teams, and select Save.
- Go to Client secrets, add a client secret, and copy it right away. It won't be shown again.
A3. Link the bot to the app
- Go to Apps and open your app.
- Go to Configure > Basic information.
- Paste the Bot ID into Application (client) ID and select Save.
A4. Turn on calling for the bot
- In your app, go to Configure > App features > Bot and select your bot.
- Under What can your bot do?, select Support audio calls and Support video calls.
- Under Select the scopes in which people can use this command, select Personal, Team and Group chat.
- Select Save.
Part B - Microsoft Azure portal
B1. Find the bot's app registration
- Sign in to the Azure portal (https://portal.azure.com) as an Azure admin.
- Go to Microsoft Entra ID > Manage > App registrations.
- UI differs from docs: The docs path Azure services > Azure Active Directory > Manage > App registrations no longer exists. Azure Active Directory has been renamed Microsoft Entra ID.
- Search for the bot by name or by Application (client) ID, and open it.
- From Overview, copy the Application (client) ID and the Directory (tenant) ID.
B2. Add Microsoft Graph permissions
- Go to Manage > API permissions and select Add a permission.
- Select Microsoft Graph, then Application permissions (not Delegated).
- Search for and select each of these permissions:
-
Permission Group User.Read.All User OnlineMeetings.ReadWrite.All OnlineMeetings Calls.InitiateGroupCall.All Calls Calls.JoinGroupCall.All Calls
-
- Select Add permissions
B3. Grant admin consent
- On API permissions, select Grant admin consent for <tenant>.
- Select Yes in the confirmation pop-up.
- Check that every permission shows Granted in the Status column.
B4. Create a service user and grant it an application access policy
Role: Microsoft Teams admin
Microsoft Teams starts every online meeting on behalf of a user. The service user is that account. The Graph permissions from B2 aren't enough by themselves: the app also needs a Teams application access policy assigned to the service user.
Create the service user
- Sign in to the Azure portal (https://portal.azure.com).
- Go to Microsoft Entra ID > Manage > Users and select New user > Create new user.
- UI differs from docs: The docs path is Azure services > User > New user.
- Fill in User principal name and Display name. Example: ServiceNow Notify Service.
- Select Create.
- Open the new user and copy its Object ID from Overview. This is the user's Object ID, not the app's.
- You'll use it in step 5 of the next part and again in C3.
Note: the service user needs a Microsoft Teams license and a valid Usage location. Without them it can't start conference calls.
Create and assign the application access policy (PowerShell)
- Open Terminal on macOS or Command Prompt on Windows, type pwsh, and press Enter.
- Install the MicrosoftTeams module
- Install-Module -Name MicrosoftTeams
- Connect to your tenant using the below command:
- Connect-MicrosoftTeams
- A sign-in confirmation appears in the browser, and PowerShell shows your tenant details.
- Connect-MicrosoftTeams
- Create the policy. Use the Bot ID / Application (client) ID from A2 as AppIds:
- New-CsApplicationAccessPolicy -Identity "<PolicyName>" -AppIds "<Bot ID>" -Description "<Policy description>"
- Example: New-CsApplicationAccessPolicy -Identity "OnlineMeetingsAccessPolicy" -AppIds "aaaaaaaa-1234-er4r-8dc9-123456789012" -Description "Grant OnlineMeeting Application Permission"
- PowerShell shows the policy details when it succeeds.
- Assign the policy to the service user. Use the policy name from step 4 and the user's Object ID from step 5 of the first part:
- Grant-CsApplicationAccessPolicy -Identity "<Service user Object ID>" -PolicyName "<PolicyName>"
- Example: Grant-CsApplicationAccessPolicy -Identity "fdcd9c17-ceae-468f-906f-2er76b4dd0f4" -PolicyName "OnlineMeetingsAccessPolicy"
- Policy changes can take a while to reach Teams. If test calls fail right after setup, wait and try again.
Part C - ServiceNow instance
C1. Create the Microsoft Teams application registry entry
Role: oauth_admin
- Go to All > System OAuth > Application Registry and select New.
- Select Connect to a third party OAuth Provider.
- Fill in the form:
- UI differs from docs: The docs say to replace common. The portal shows organizations.
-
Field Value Name Something short. The OAuth entity profile name is built from it. Example: Notify Teams App Client ID The Bot ID / Application (client) ID Client Secret The secret from A2 step 5 Default Grant type Client Credentials Token URL https://login.microsoftonline.com/<Directory (tenant) ID>/oauth2/v2.0/token
To get the Token URL from Azure: open the app registration and go to Endpoints. Copy OAuth 2.0 token endpoint (v2), then replace organizations in that URL with your Directory (tenant) ID.
- In the OAuth Entity Scopes related list, add a record with Name Default and OAuth scope ".default".
- Save the record.
- UI differs from docs: The docs' step 7 (setting up the OAuth entity profile by hand) isn't needed.
C2. Create the Connection & Credential alias
Role: admin
- Go to All > Connections & Credentials > Connection & Credential Aliases.
- Open MSTeamsCommunicationsSpoke.
- In the Credentials related list, select New > OAuth 2.0 Credentials.
- Fill in the form:
- UI differs from docs: The docs' example name, Notify Microsoft Teams credentials for self-configured app, is too long for the field.
-
Field Value Name A short name. Example: Notify Teams Credentials OAuth Entity Profile The profile created in C1, e.g. Notify Teams App_default_profile
- Select Submit.
C3. Update the records on the Microsoft Teams Configuration page
Role: admin
- Go to All > Notify > Microsoft Teams > Configuration.
- On the Microsoft Teams Configuration form, fill in the fields:
-
Field Value Credential Alias sn_msteams_com_spk.MSTeamsCommunicationsSpoke Application registry The record created in C1, e.g. Notify Teams App Tenant ID The Directory (tenant) ID from B1 Requester The credential created in C2, e.g. Notify Teams Credentials Service user Azure ID The service user's Object ID from B4. Enable create online meeting Selected
-
- Right-click the form header and select Save.
Result: saving the form also creates an OIDC Application Registry record. C4 checks that it was created.
C4. Verify the OIDC Application Registry was created
Role: oauth_admin
If this record is missing, the instance can't process callbacks from Microsoft Teams, and meeting details won't update in real time.
- Go to All > System OAuth > Application Registry.
- Filter the list by your Client ID (the Bot ID / Application (client) ID).
- Check that the list has two records for that Client ID:
- the OAuth Provider record you created in C1
- an External OIDC Provider record
If both are there, you're done. If the External OIDC Provider record is missing, create it yourself using the below steps:
- On Application Registries, select New.
- Select Configure an OIDC provider to verify ID tokens.
- Fill in the form:
-
Field Value Name The C1 record name with OIDC added, e.g. Notify Teams App OIDC Client ID Same Client ID as the C1 record OAuth OIDC Provider Configuration Notify Teams OIDC Config
-
- Right-click the form header and select Save.
- An OAuth entity profile is created automatically. Make sure its grant type is Client Credentials.
- In the OAuth Entity Scopes related list, add a row:
-
Name OAuth scope Notify Teams App OIDC default profile https://api.botframework.com/.default
-
- Right click the form header and select Save