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
{{ message }}
This repository was archived by the owner on May 17, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: 5-AccessControl/2-call-api-groups/AppCreationScripts/Cleanup.ps1
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,16 @@ Function Cleanup
72
72
Write-Warning$Error[0]
73
73
Write-Host"Unable to remove ServicePrincipal 'msal-angular-app'. Error is $message. Try deleting manually from Enterprise applications."-ForegroundColor White -BackgroundColor Red
74
74
}
75
+
Write-Host"You may want to remove the security group 'GroupAdmin' if it was created to test this sample only."
name: Angular single-page application calling a protected AspNet Core web API and using Security Groups to implement Role-Based Access Control
21
+
description: Angular single-page application calling a protected AspNet web API and using Security Groups to implement Role-Based Access Control (RBAC)
16
22
---
17
23
18
-
# Angular single-page application calling a protected Core web API using Security Groups to implement Role-Based Access Control
24
+
# Angular single-page application calling a protected AspNet Core web API and using Security Groups to implement Role-Based Access Control
19
25
20
26
*[Overview](#overview)
21
27
*[Scenario](#scenario)
@@ -109,7 +115,7 @@ For more information and potential issues, see: [HTTPS in .NET Core](https://doc
109
115
110
116
> :information_source: While there are multiple project in this sample, we'd register just one app with Azure AD and use the registered app's *client id* in both apps. This reuse of app ids (client ids) is used when the apps themselves are just components of one larger app topology.
111
117
112
-
There are two projects in this sample. To register it, you can:
118
+
There is one project in this sample. To register it, you can:
113
119
114
120
- follow the steps below for manually register your apps
115
121
- or use PowerShell scripts that:
@@ -172,12 +178,12 @@ To manually register the apps, as a first step you'll need to:
172
178
173
179
1. All APIs must publish a minimum of one [scope](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code), also called [Delegated Permission](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#permission-types), for the client apps to obtain an access token for a *user* successfully. To publish a scope, follow these steps:
174
180
1. Select **Add a scope** button open the **Add a scope** screen and Enter the values as indicated below:
175
-
1. For **Scope name**, use `access_via_group_assignment`.
181
+
1. For **Scope name**, use `access_via_group_assignments`.
176
182
1. Select **Admins and users** options for **Who can consent?**.
177
-
1. For **Admin consent display name** type in *Access 'msal-angular-app' as the signed-in user.*.
178
-
1. For **Admin consent description** type in *Allow the app to access the 'msal-angular-app' as a signed-in user.*.
179
-
1. For **User consent display name** type in *Access 'msal-angular-app' on your behalf.*.
180
-
1. For **User consent description** type in *Allow the app to access the 'msal-angular-app' on your behalf.*.
183
+
1. For **Admin consent display name** type in *Access 'msal-angular-app' as the signed-in user assigned to group memberships.*.
184
+
1. For **Admin consent description** type in *Allow the app to access the 'msal-angular-app' as a signed-in user assigned to one or more security groups.*.
185
+
1. For **User consent display name** type in *Access 'msal-angular-app' on your behalf after security group assignment.*.
186
+
1. For **User consent description** type in *Allow the app to access the 'msal-angular-app' on your behalf after assignment to one or more security groups.*.
181
187
1. Keep **State** as **Enabled**.
182
188
1. Select the **Add scope** button on the bottom to save this scope.
183
189
1. Select the **Manifest** blade on the left.
@@ -193,14 +199,14 @@ To manually register the apps, as a first step you'll need to:
193
199
1. Select the **Add a permission** button and then:
194
200
1. Ensure that the **My APIs** tab is selected.
195
201
1. In the list of APIs, select the API `msal-angular-app`.
196
-
1. Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is requested by apps when signing-in users.
197
-
1. In the **Delegated permissions** section, select the **Access 'msal-angular-app'** in the list. Use the search box if necessary.
202
+
* Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is requested by apps when signing-in users.
203
+
1. In the **Delegated permissions** section, select **access_via_group_assignments** in the list. Use the search box if necessary.
198
204
1. Select the **Add permissions** button at the bottom.
199
205
1. Select the **Add a permission** button and then:
200
206
1. Ensure that the **Microsoft APIs** tab is selected.
201
207
1. In the *Commonly used Microsoft APIs* section, select **Microsoft Graph**
202
208
* Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is requested by apps when signing-in users.
203
-
1. In the **Delegated permissions** section, select the **User.Read**, **GroupMember.Read.All** in the list. Use the search box if necessary.
209
+
1. In the **Delegated permissions** section, select **User.Read**, **GroupMember.Read.All** in the list. Use the search box if necessary.
204
210
1. Select the **Add permissions** button at the bottom.
0 commit comments