You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/managed-identities-azure-resources/how-to-assign-app-role-managed-identity-powershell.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.subservice: msi
12
12
ms.topic: how-to
13
13
ms.tgt_pltfrm: na
14
14
ms.workload: identity
15
-
ms.date: 12/10/2020
15
+
ms.date: 05/12/2022
16
16
ms.author: jodowns
17
17
ms.collection: M365-identity-device-management
18
18
ms.custom: devx-track-azurepowershell
@@ -27,15 +27,13 @@ Managed identities for Azure resources provide Azure services with an identity i
27
27
28
28
In this article, you learn how to assign a managed identity to an application role exposed by another application using Azure AD PowerShell.
- If you're unfamiliar with managed identities for Azure resources, check out the [overview section](overview.md). **Be sure to review the [difference between a system-assigned and user-assigned managed identity](overview.md#managed-identity-types)**.
35
33
- If you don't already have an Azure account, [sign up for a free account](https://azure.microsoft.com/free/) before continuing.
36
34
- To run the example scripts, you have two options:
37
35
- Use the [Azure Cloud Shell](../../cloud-shell/overview.md), which you can open using the **Try It** button on the top-right corner of code blocks.
38
-
- Run scripts locally by installing the latest version of [Azure AD PowerShell](/powershell/azure/active-directory/install-adv2).
36
+
- Run scripts locally by installing the latest version of [the Az PowerShell module](/powershell/azure/install-az-ps) and the [Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started).
39
37
40
38
## Assign a managed identity access to another application's app role
41
39
@@ -62,7 +60,7 @@ In this article, you learn how to assign a managed identity to an application ro
62
60
1. Find the object ID of the service application's service principal. You can find this using the Azure portal. Go to Azure Active Directory and open the **Enterprise applications** page, then find the application and look for the **Object ID**. You can also find the service principal's object ID by its display name using the following PowerShell script:
@@ -88,19 +86,23 @@ In this article, you learn how to assign a managed identity to an application ro
88
86
* `serverServicePrincipalObjectId`: the object ID of the server application's service principal, which you found in step 4.
89
87
* `appRoleId`: the ID of the app role exposed by the server app, which you generated in step 5 - in the example, the app role ID is `0566419e-bb95-4d9d-a4f8-ed9a0f147fa6`.
90
88
91
-
Execute the following PowerShell script to add the role assignment:
89
+
Execute the following PowerShell command to add the role assignment:
0 commit comments