Set up the Microsoft Teams Communications spoke
Integrate the ServiceNow instance and Microsoft Teams Communications account by creating a custom OAuth application in Microsoft Teams Communications to authenticate ServiceNow requests.
始める前に
- Request an Integration Hub subscription.
- Activate the Microsoft Teams Communications spoke.
- Role required: admin.
Create an app in Microsoft Teams to enable making calls
Create an app to make outbound calls from Microsoft Teams.
始める前に
Role required: admin, Microsoft Teams admin, Microsoft Azure admin
手順
-
Log in to Microsoft Teams developer portal.
注:
The Developer Portal for the Government Community Cloud (GCC) is accessible only through an application within Microsoft Teams. It is not available as a separate, standalone website. For more information, see Developer Portal for Teams. To create an app for GCC, you must create the app from Microsoft Teams.
-
Create an app.
- Navigate to Apps > New app.
- Enter a valid name for the app in the Add app pop-up page and select Add.
-
On the App details page, fill in the fields.
表 : 1. App details page Field Description Short name Name of your application. For example, ServiceNow for Notify Microsoft Teams. Full name Full name of your application. App ID Unique identification number for the app. 注:This App ID is different from the Bot ID/App ID that will be generated in further steps.Short description Brief description of the app. Long description Detailed description of the app. Version Version for the app.
For example, 1.0.
Developer or company Name Name of your company. Website Link to your company website. Privacy policy Link to the privacy statement for your app. Terms of use Link to the terms and conditions for your app. -
Select Save.
An app is created in Microsoft Teams.
-
Create a bot for the new app.
- Navigate to Configure > App features.
- Select Bot.
- Select Create a new bot.
- Select New Bot.
- Enter a valid name for bot in the Add bot pop-up page and select Add.
-
Copy to a notepad the Bot ID value of the new bot using one of the following options and this will be your app Client ID.
- Copy the ID from the browser URL.
- Navigate back to Bots > Tools, and copy the Bot ID.
- Go to Channels, enable Microsoft Teams, and select Save.
-
Select Client secrets and enter a client secret for your bot.
A Client secret is generated.注:Ensure you copy the generated Client secret to a notepad because it will not appear again.
-
Copy the Client ID or Bot ID of the new bot to the Application (client ID).
- Go to Apps and select the app you created.
- Navigate to Configure > Basic information.
- Paste the Client ID/Bot ID that you copied during step 3f in the Application (client) ID field and select Save.
-
Configure additional app features for new bot.
- Go to Apps and select the app you created.
- Navigate to Configure > App features > Bot > Select an existing bot and select the bot you created.
- Select Support audio calls and Support video calls from 'What can your bot do?'.
- Select Personal, Team, and Group chat from 'Select the scopes in which people can use this command'.
-
Copy the new app attributes.
- Log in to Microsoft Azure portal as Microsoft Azure admin.
- Navigate to Azure services > Azure Active Directory > Manage > App registrations.
- Search and open the new bot created for the spoke by name or by Application (client) ID.
-
Make a note of client ID/Application (client) ID, Object ID, and tenant ID to update these values in your ServiceNow instance in later procedures.
注:Bot ID created in the Microsoft Teams Developer portal and Application (client) ID in the Microsoft Azure portal are the same.
Manage permissions and authenticate the app and bot in Microsoft Azure portal
Assign permissions to users to be able to authenticate successfully and participate in conference calls in Microsoft Teams.
始める前に
Role required: Microsoft Azure admin
このタスクについて
You can manage the permissions required by the app and bot to perform required actions for conference calls.
手順
- Log in to Microsoft Azure portal.
- Navigate to Azure Services > Azure Active Directory > Manage > App registrations.
- Search and open the bot created in step 3 in the section Create an app in Microsoft Teams to enable making calls by name or by Application (client) ID.
- Navigate to Manage > API Permissions > Add a permission > Microsoft Graph and select Application Permissions.
-
Search and select the following values using Select permissions, and then select Add permissions to grant the permission.
- User.Read.All from User list.
- OnlineMeetings.ReadWrite.All from OnlineMeetings list.
- Calls.InitiateGroupCall.All, Calls.JoinGroupCall.All, Calls.JoinGroupCallAsGuest.All from Calls list.
-
Grant admins access to the Microsoft Azure applications that require admin approval.
- Select Grant admin consent for <tenant> in the API permissions page.
- Select Yes in the Grant admin consent confirmation pop-up page.
Create a Service user to make calls from Microsoft Teams
Create a service user role to be able to start online meetings on behalf of users in Microsoft Teams.
始める前に
Role required: admin
手順
- Log in to Microsoft Azure portal.
-
Create a Service user.
- Navigate to Azure services > User.
- Select New user.
-
On the form, fill the fields.
表 : 2. New user Field Description User name Option to provide the user name for the user. Name Option to provide the name of the user. - Select Create.
-
Select the created user to view the details.
注:Ensure that the Service User has the required license/subscription and a valid usage location set to make conference calls from Microsoft Teams.
-
Run the PowerShell command from Terminal on macOS or from the Command prompt on Windows OS.
- Type the command pwsh and press Enter.
- Connect your Microsoft tenant with PowerShell.
-
Run the following command in PowerShell.
connect-microsoftteamsUpon successful connection, a confirmation message is displayed in the browser.
PowerShell will also display the tenant details.
-
Run the command below to create a new Application Access Policy in PowerShell.
Use the bot ID created in step 3 in the section Create an app in Microsoft Teams to enable making calls as the AppId for the command.
For more information on the application access policy, see Configure application access to online meetings.Syntax: New-CsApplicationAccessPolicy -Identity "<PolicyName (can be anything)>" -AppIds "<AppIds>" -Description "<Policy Description>" Example: If you have a Self-configured (single tenant) setup, use the application ID from Azure portal. For Example: New-CsApplicationAccessPolicy -Identity "OnlineMeetingsAccessPolicy" -AppIds "aaaaaaaa-1234-er4r-8dc9-123456789012" -Description "Grant OnlineMeeting Application Permission"Upon successfully creating the policy, the details are displayed in PowerShell.
-
Run the user permission policy in PowerShell.
- Go to the Microsoft Azure portal.
- Navigate to Home > Users.
- Select the user created.
- Copy the Object ID of the user to notepad.
-
Use the policy name created in the previous step as the PolicyName of the command and the Object ID as the UserAzureID respectively in the
command to execute in PowerShell.
Syntax: Grant-CsApplicationAccessPolicy -Identity "<UserAzureID>" -PolicyName "<PolicyName>" Example: Grant-CsApplicationAccessPolicy -Identity "fdcd9c17-ceae-468f-906f-2er76b4dd0f4" -PolicyName "OnlineMeetingsAccessPolicy"
Register Microsoft Teams Communications as an OAuth provider
Use the information generated during the application configuration in Microsoft Azure portal to register Microsoft Teams Communications as the OAuth provider so that the ServiceNow instance can request OAuth 2.0 tokens.
始める前に
Role required: admin
手順
- Navigate to All > System OAuth > Application Registry.
-
Click New.
The system displays this message: What kind of OAuth application?.
- Select Connect to a third party OAuth Provider.
-
On the form, fill these values.
表 : 3. Application Registries form Field Description Client ID Application ID created during application registration. Client Secret Client secret created during application registration. Active Option to actively use the application registry. Authorization URL OAuth authorization code endpoint. Enter https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/authorize. Token URL OAuth server token endpoint. Enter https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/token. Token Revocation URL OAuth server token revocation endpoint. Redirect URL OAuth callback endpoint. Enter https://<instance-name>.service-now.com/oauth_redirect.do. Default Grant type Grant type used to establish the token. Select Client Credentials. - Right-click the form header, and click Save.
-
In the OAuth Entity Scopes tab, insert a row and fill
these values:
Field Description Name Name to identify the entity scope record. For example, MS Teams Comm OAuth Scope. OAuth scope OAuth entity scope. Enter .default. - Right-click the form header, and click Save.
- In the OAuth Entity Profiles tab, open the default profile record.
- In the OAuth Entity Scopes tab, insert a record.
- Search and select the OAuth entity scope you had created.
- Click Update.
Create a credential record for the Microsoft Teams Communications
Authorize the Microsoft Teams Communications spoke actions by creating credential records for the application registered in the Microsoft Azure portal. The Microsoft Teams Communications connection and credential alias uses these credentials to authorize actions.
始める前に
Role required: admin
手順
- Navigate to All > Connections & Credentials > Connections & Credentials Aliases.
- Open the alias record, MSTeamsCommunicationsSpoke.
-
From the Credentials tab, click
New.
The system displays this message: What type of Credentials would you like to create?
- Select OAuth 2.0 Credentials.
-
On the form, fill in the fields.
表 : 4. OAuth 2.0 Credentials form Field Description Name Name to uniquely identify the record. For example, MS Teams Comm Cred. Active Option to actively use the credential record. OAuth Entity Profile OAuth profile created during the registration of Microsoft Teams Communications as an OAuth provider. For example, MS Teams Comm OAuth Prof. - Right-click the form header and click Submit.
- To generate the OAuth token, click the Get OAuth Token related link.