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.
description: An Angular SPA using MSAL Angular to sign-in users with Azure Active Directory and call a protected .NET Core web API
14
15
---
15
16
16
-
# Angular single-page application using MSAL Angular to sign-in users with Azure Active Directory and call a .NET Core web API
17
+
# An Angular SPA using MSAL Angular to sign-in users with Azure Active Directory and call a protected .NET Core web API
17
18
18
19
*[Overview](#overview)
19
20
*[Scenario](#scenario)
@@ -95,7 +96,7 @@ For more information and potential issues, see: [HTTPS in .NET Core](https://doc
95
96
npm install
96
97
```
97
98
98
-
### Step 4: Register the sample application(s) in your tenant
99
+
### Step 3: Register the sample application(s) in your tenant
99
100
100
101
There are two projects in this sample. Each needs to be separately registered in your Azure AD tenant. To register these projects, you can:
101
102
@@ -130,7 +131,7 @@ There are two projects in this sample. Each needs to be separately registered in
130
131
131
132
#### Choose the Azure AD tenant where you want to create your applications
132
133
133
-
As a first step you'll need to:
134
+
To manually register the apps, as a first step you'll need to:
134
135
135
136
1. Sign in to the [Azure portal](https://portal.azure.com).
136
137
1. If your account is present in more than one Azure AD tenant, select your profile at the top right corner in the menu on top of the page, and then **switch directory** to change your portal session to the desired Azure AD tenant.
@@ -154,18 +155,18 @@ As a first step you'll need to:
154
155
1. Select **Add a scope** button open the **Add a scope** screen and Enter the values as indicated below:
155
156
1. For **Scope name**, use `TodoList.Read`.
156
157
1. Select **Admins and users** options for **Who can consent?**.
157
-
1. For **Admin consent display name** type in the details, `e.g. Allows to read Todolist items`.
158
-
1. For **Admin consent description** type in the details `e.g. Allow the app to read Todolist items on your behalf.`
159
-
1. For **User consent display name** type in the details `e.g. Allows to read Todolist items`.
160
-
1. For **User consent description** type in the details `e.g. Allow the app to read Todolist items on your behalf.`
158
+
1. For **Admin consent display name** type in the details, `e.g. Allow the users of the app msal-dotnet-api to read ToDo list items`.
159
+
1. For **Admin consent description** type in the details `e.g. Allows the app msal-dotnet-api to read the signed-in users ToDo list items.`
160
+
1. For **User consent display name** type in the details `e.g. Read ToDo list items as yourself`.
161
+
1. For **User consent description** type in the details `e.g. Allow the app msal-dotnet-api to read ToDo list items on your behalf.`
161
162
1. Keep **State** as **Enabled**.
162
163
1. Select the **Add scope** button on the bottom to save this scope.
163
164
> Repeat the steps above for another scope named **TodoList.ReadWrite**
164
165
1. Select the **Manifest** blade on the left.
165
166
1. Set `accessTokenAcceptedVersion` property to **2**.
166
167
1. Select on **Save**.
167
168
168
-
> :information_source: Be aware of [the principle of least privilege](https://docs.microsoft.com/azure/active-directory/develop/secure-least-privileged-access) whenever you are publishing permissions for a web API.
169
+
> :information_source: Follow [the principle of least privilege](https://docs.microsoft.com/azure/active-directory/develop/secure-least-privileged-access) whenever you are publishing permissions for a web API.
169
170
170
171
##### Publish Application Permissions
171
172
@@ -210,7 +211,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
210
211
1. Select **Register** to create the application.
211
212
1. In the **Overview** blade, find and note the **Application (client) ID**. You use this value in your app's configuration file(s) later in your code.
212
213
1. Since this app signs-in users, we will now proceed to select **delegated permissions**, which is is required by apps signing-in users.
213
-
1. In the app's registration screen, select the **API permissions** blade in the left to open the page where we add access to the APIs that your application needs:
214
+
1. In the app's registration screen, select the **API permissions** blade in the left to open the page where we add access to the APIs that your application needs:
214
215
1. Select the **Add a permission** button and then,
215
216
1. Ensure that the **My APIs** tab is selected.
216
217
1. In the list of APIs, select the API `msal-dotnet-api`.
@@ -228,7 +229,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
228
229
1. Find the key `Enter_the_Tenant_Info_Here` and replace the existing value with your Azure AD tenant ID.
229
230
1. Find the key `Enter_the_Web_Api_Application_Id_Here` and replace the existing value(s) with the application ID (client ID) of the web API project that you've registered earlier, e.g. `api://<msal-dotnet-api-client-id>/TodoList.Read`
230
231
231
-
### Step 5: Running the sample
232
+
### Step 4: Running the sample
232
233
233
234
From your shell or command line, execute the following commands:
0 commit comments