Skip to content

Commit 12895da

Browse files
committed
Update section on how to create app roles with Microsoft graph
1 parent e3f5ae6 commit 12895da

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

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

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,25 @@ In this article, you learn how to assign a managed identity to an application ro
7676
> [!NOTE]
7777
> Display names for applications are not unique, so you should verify that you obtain the correct application's service principal.
7878
79-
1. Add an [app role](../develop/howto-add-app-roles-in-azure-ad-apps.md) to the application you created in step 3. You can create the role using the Azure portal or by using Microsoft Graph. For example, you could add an app role like this:
79+
1. Add an [app role](../develop/howto-add-app-roles-in-azure-ad-apps.md) to the application you created in step 3. You can create the role using the Azure portal or by using Microsoft Graph. For example, you could add an app role by running the following query on Graph explorer:
80+
81+
```http
82+
PATCH /applications/{id}/
8083
81-
```json
8284
{
83-
"allowedMemberTypes": [
84-
"Application"
85-
],
86-
"displayName": "Read data from MyApi",
87-
"id": "0566419e-bb95-4d9d-a4f8-ed9a0f147fa6",
88-
"isEnabled": true,
89-
"description": "Allow the application to read data as itself.",
90-
"value": "MyApi.Read.All"
85+
"appRoles": [
86+
{
87+
"allowedMemberTypes": [
88+
"User",
89+
"Application"
90+
],
91+
"description": "Read reports",
92+
"id": "1e250995-3081-451e-866c-0f6efef9c638",
93+
"displayName": "Report reader",
94+
"isEnabled": true,
95+
"value": "report.read"
96+
}
97+
]
9198
}
9299
```
93100

0 commit comments

Comments
 (0)