Skip to content

Commit ef05a6c

Browse files
committed
1343456 Update docs for assigning user roles for ACG on Project Synergy
1 parent 24dedaf commit ef05a6c

File tree

1 file changed

+39
-28
lines changed

1 file changed

+39
-28
lines changed

articles/communications-gateway/connect-operator-connect.md

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rcdun
55
ms.author: rdunstan
66
ms.service: communications-gateway
77
ms.topic: integration
8-
ms.date: 02/16/2024
8+
ms.date: 03/22/2024
99
ms.custom:
1010
- template-how-to-pattern
1111
- has-azure-ad-ps-ref
@@ -62,7 +62,7 @@ If you want to set up Teams Phone Mobile and you didn't select it when you deplo
6262
Before starting this step, check that the **Provisioning Status** field for your resource is "Complete".
6363

6464
> [!NOTE]
65-
>This step and the next step ([Assign an Admin user to the Project Synergy application](#assign-an-admin-user-to-the-project-synergy-application)) set you up as an Operator in the Teams Phone Mobile (TPM) and Operator Connect (OC) environments. If you've already gone through onboarding, go to [Find the Object ID and Application ID for your Azure Communication Gateway resource](#find-the-object-id-and-application-id-for-your-azure-communication-gateway-resource).
65+
>This step and the next step ([Assign an Admin user to the Project Synergy application](#assign-an-admin-user-to-the-project-synergy-application)) set you up as an Operator in the Teams Phone Mobile (TPM) and Operator Connect (OC) environments. If you've already gone through onboarding, go to [Find the Application ID for your Azure Communication Gateway resource](#find-the-application-id-for-your-azure-communication-gateway-resource).
6666
6767
The Operator Connect and Teams Phone Mobile programs require your Microsoft Entra tenant to contain a Microsoft application called Project Synergy. Operator Connect and Teams Phone Mobile inherit permissions and identities from your Microsoft Entra tenant through the Project Synergy application. The Project Synergy application also allows configuration of Operator Connect or Teams Phone Mobile and assigning users and groups to specific roles.
6868

@@ -71,14 +71,14 @@ To add the Project Synergy application:
7171
1. Check whether the Microsoft Entra ID (`AzureAD`) module is installed in PowerShell. Install it if necessary.
7272
1. Open PowerShell.
7373
1. Run the following command and check whether `AzureAD` appears in the output.
74-
```azurepowershell
74+
```powershell
7575
Get-Module -ListAvailable
7676
```
7777
1. If `AzureAD` doesn't appear in the output, install the module.
7878
1. Close your current PowerShell window.
7979
1. Open PowerShell as an admin.
8080
1. Run the following command.
81-
```azurepowershell
81+
```powershell
8282
Install-Module AzureAD
8383
```
8484
1. Close your PowerShell admin window.
@@ -88,7 +88,7 @@ To add the Project Synergy application:
8888
1. Scroll down to the Tenant ID field. Your tenant ID is in the box. Make a note of your tenant ID.
8989
1. Open PowerShell.
9090
1. Run the following cmdlet, replacing *`<TenantID>`* with the tenant ID you noted down in step 5.
91-
```azurepowershell
91+
```powershell
9292
Connect-AzureAD -TenantId "<TenantID>"
9393
New-AzureADServicePrincipal -AppId eb63d611-525e-4a31-abd7-0cb33f679599 -DisplayName "Operator Connect"
9494
```
@@ -108,7 +108,7 @@ The user who sets up Azure Communications Gateway needs to have the Admin user r
108108
109109
[!INCLUDE [communications-gateway-oc-configuration-ownership](includes/communications-gateway-oc-configuration-ownership.md)]
110110
111-
## Find the Object ID and Application ID for your Azure Communication Gateway resource
111+
## Find the Application ID for your Azure Communication Gateway resource
112112
113113
Each Azure Communications Gateway resource automatically receives a [system-assigned managed identity](../active-directory/managed-identities-azure-resources/overview.md), which Azure Communications Gateway uses to connect to the Operator Connect environment. You need to find the Object ID and Application ID of the managed identity, so that you can connect Azure Communications Gateway to the Operator Connect or Teams Phone Mobile environment in [Set up application roles for Azure Communications Gateway](#set-up-application-roles-for-azure-communications-gateway) and [Add the Application IDs for Azure Communications Gateway to Operator Connect](#add-the-application-ids-for-azure-communications-gateway-to-operator-connect).
114114
@@ -118,7 +118,6 @@ Each Azure Communications Gateway resource automatically receives a [system-assi
118118
1. Select **Identity**.
119119
1. In **System assigned**, copy the **Object (principal) ID**.
120120
1. Search for the value of **Object (principal) ID** with the search bar. You should see an enterprise application with that value under the **Microsoft Entra ID** subheading. You might need to select **Continue searching in Microsoft Entra ID** to find it.
121-
1. Make a note of the **Object (principal) ID**.
122121
1. Select the enterprise application.
123122
1. Check that the **Object ID** matches the **Object (principal) ID** value that you copied.
124123
1. Make a note of the **Application ID**.
@@ -132,18 +131,18 @@ Azure Communications Gateway contains services that need to access the Operator
132131
133132
Do the following steps in the tenant that contains your Project Synergy application.
134133
135-
1. Check whether the Microsoft Entra ID (`AzureAD`) module is installed in PowerShell. Install it if necessary.
134+
1. Check whether the Microsoft Graph (`Microsoft.Graph`) module is installed in PowerShell. Install it if necessary.
136135
1. Open PowerShell.
137-
1. Run the following command and check whether `AzureAD` appears in the output.
138-
```azurepowershell
136+
1. Run the following command and check whether `Microsoft.Graph` appears in the output.
137+
```powershell
139138
Get-Module -ListAvailable
140139
```
141-
1. If `AzureAD` doesn't appear in the output, install the module.
140+
1. If `Microsoft.Graph` doesn't appear in the output, install the module.
142141
1. Close your current PowerShell window.
143142
1. Open PowerShell as an admin.
144143
1. Run the following command.
145-
```azurepowershell
146-
Install-Module AzureAD
144+
```powershell
145+
Install-Module -Name Microsoft.Graph -Scope CurrentUser
147146
```
148147
1. Close your PowerShell admin window.
149148
1. Sign in to the [Azure portal](https://ms.portal.azure.com/) as a Microsoft Entra Global Administrator.
@@ -152,19 +151,18 @@ Do the following steps in the tenant that contains your Project Synergy applicat
152151
1. Scroll down to the Tenant ID field. Your tenant ID is in the box. Make a note of your tenant ID.
153152
1. Open PowerShell.
154153
1. Run the following cmdlet, replacing *`<TenantID>`* with the tenant ID you noted down in step 5.
155-
```azurepowershell
156-
Connect-AzureAD -TenantId "<TenantID>"
154+
```powershell
155+
Connect-MgGraph -Scopes "Application.Read.All", "AppRoleAssignment.ReadWrite.All" -TenantId "<TenantID>"
157156
```
158-
1. Run the following cmdlet, replacing *`<CommunicationsGatewayObjectID>`* with the Object ID you noted down in [Find the Object ID and Application ID for your Azure Communication Gateway resource](#find-the-object-id-and-application-id-for-your-azure-communication-gateway-resource).
159-
```azurepowershell
160-
$commGwayObjectId = "<CommunicationsGatewayObjectID>"
157+
1. Run the following cmdlet, replacing *`<CommunicationsGatewayName>`* with the name of your Azure Communications Gateway resource.
158+
```powershell
159+
$acgName = "<CommunicationsGatewayName>"
161160
```
162161
1. Run the following PowerShell commands. These commands add the following roles for Azure Communications Gateway: `TrunkManagement.Read`, `TrunkManagement.Write`, `partnerSettings.Read`, `NumberManagement.Read`, `NumberManagement.Write`, `Data.Read`, `Data.Write`.
163-
```azurepowershell
162+
```powershell
164163
# Get the Service Principal ID for Project Synergy (Operator Connect)
165164
$projectSynergyApplicationId = "eb63d611-525e-4a31-abd7-0cb33f679599"
166-
$projectSynergyEnterpriseApplication = Get-AzureADServicePrincipal -Filter "AppId eq '$projectSynergyApplicationId'"
167-
$projectSynergyObjectId = $projectSynergyEnterpriseApplication.ObjectId
165+
$projectSynergyEnterpriseApplication = Get-MgServicePrincipal -Filter "AppId eq '$projectSynergyApplicationId'" # "Application.Read.All"
168166
169167
# Required Operator Connect - Project Synergy Roles
170168
$trunkManagementRead = "72129ccd-8886-42db-a63c-2647b61635c1"
@@ -174,14 +172,27 @@ Do the following steps in the tenant that contains your Project Synergy applicat
174172
$numberManagementWrite = "752b4e79-4b85-4e33-a6ef-5949f0d7d553"
175173
$dataRead = "eb63d611-525e-4a31-abd7-0cb33f679599"
176174
$dataWrite = "98d32f93-eaa7-4657-b443-090c23e69f27"
177-
178175
$requiredRoles = $trunkManagementRead, $trunkManagementWrite, $partnerSettingsRead, $numberManagementRead, $numberManagementWrite, $dataRead, $dataWrite
179-
180-
foreach ($role in $requiredRoles) {
181-
# Assign the relevant Role to the managed identity for the Azure Communications Gateway resource
182-
New-AzureADServiceAppRoleAssignment -ObjectId $commGwayObjectId -PrincipalId $commGwayObjectId -ResourceId $projectSynergyObjectId -Id $role
176+
177+
# Locate the Azure Communications Gateway resource by name
178+
$acgServicePrincipal = Get-MgServicePrincipal -Filter ("displayName eq '$acgName'")
179+
180+
# Assign the required roles to the managed identity of the Azure Communications Gateway resource
181+
$currentAssignments = Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id
182+
foreach ($appRoleId in $requiredRoles) {
183+
$assigned = $currentAssignments | Where-Object { $_.AppRoleId -eq $AppRoleId }
184+
if (-not $assigned) {
185+
$params = @{
186+
principalId = $acgServicePrincipal.Id
187+
resourceId = $projectSynergyEnterpriseApplication.Id
188+
appRoleId = $appRoleId
189+
}
190+
New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id -BodyParameter $params
191+
}
183192
}
184-
193+
194+
# Check the assigned roles
195+
Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id
185196
```
186197
187198
## Provide additional information to your onboarding team
@@ -207,7 +218,7 @@ Go to the [Operator Connect homepage](https://operatorconnect.microsoft.com/) an
207218
## Add the Application IDs for Azure Communications Gateway to Operator Connect
208219
209220
You must enable Azure Communications Gateway within the Operator Connect or Teams Phone Mobile environment. This process requires configuring your environment with two Application IDs:
210-
- The Application ID of the system-assigned managed identity that you found in [Find the Object ID and Application ID for your Azure Communication Gateway resource](#find-the-object-id-and-application-id-for-your-azure-communication-gateway-resource). This Application ID allows Azure Communications Gateway to use the roles that you set up in [Set up application roles for Azure Communications Gateway](#set-up-application-roles-for-azure-communications-gateway).
221+
- The Application ID of the system-assigned managed identity that you found in [Find the Application ID for your Azure Communication Gateway resource](#find-the-application-id-for-your-azure-communication-gateway-resource). This Application ID allows Azure Communications Gateway to use the roles that you set up in [Set up application roles for Azure Communications Gateway](#set-up-application-roles-for-azure-communications-gateway).
211222
- A standard Application ID for an automatically created AzureCommunicationsGateway enterprise application. This ID is always `8502a0ec-c76d-412f-836c-398018e2312b`.
212223
213224
To add the Application IDs:

0 commit comments

Comments
 (0)