Skip to content

Commit 65fa8d9

Browse files
committed
Update example
1 parent 3eef680 commit 65fa8d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.subservice: msi
1212
ms.topic: how-to
1313
ms.tgt_pltfrm: na
1414
ms.workload: identity
15-
ms.date: 05/12/2022
15+
ms.date: 09/06/2023
1616
ms.author: jodowns
1717
ms.collection: M365-identity-device-management
1818
ms.custom: devx-track-azurepowershell
@@ -109,10 +109,10 @@ In this article, you learn how to assign a managed identity to an application ro
109109
110110
```powershell
111111
New-AzureADServiceAppRoleAssignment `
112-
-ObjectId $managedIdentityObjectId `
112+
-ObjectId $serverServicePrincipalObjectId `
113+
-ResourceId $serverServicePrincipalObjectId `
113114
-Id $appRoleId `
114-
-PrincipalId $managedIdentityObjectId `
115-
-ResourceId $serverServicePrincipalObjectId
115+
-PrincipalId $managedIdentityObjectId
116116
```
117117
118118
# [Microsoft Graph](#tab/microsoftgraph)
@@ -162,10 +162,10 @@ $appRoleId = ($serverServicePrincipal.AppRoles | Where-Object {$_.Value -eq $app
162162
163163
# Assign the managed identity access to the app role.
164164
New-AzureADServiceAppRoleAssignment `
165-
-ObjectId $managedIdentityObjectId `
165+
-ObjectId $serverServicePrincipalObjectId `
166+
-ResourceId $serverServicePrincipalObjectId `
166167
-Id $appRoleId `
167-
-PrincipalId $managedIdentityObjectId `
168-
-ResourceId $serverServicePrincipalObjectId
168+
-PrincipalId $managedIdentityObjectId
169169
```
170170

171171
# [Microsoft Graph](#tab/microsoftgraph)

0 commit comments

Comments
 (0)