Skip to content

Commit 79ee287

Browse files
committed
review changes
1 parent fc9aa4f commit 79ee287

File tree

12 files changed

+13729
-67
lines changed

12 files changed

+13729
-67
lines changed

7-AdvancedScenarios/1-call-api-obo/AppCreationScripts/Configure.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ Function ConfigureApplications
402402
UpdateTextFile -configFilePath $configFile -dictionary $dictionary
403403

404404
# Update config file for 'client'
405-
$configFile = $pwd.Path + "\..\SPA\src\app\authConfig.ts"
405+
$configFile = $pwd.Path + "\..\SPA\src\app\auth-config.ts"
406406
Write-Host "Updating the sample code ($configFile)"
407407
$dictionary = @{ "Enter_the_Application_Id_Here" = $clientAadApplication.AppId;"Enter_the_Tenant_Info_Here" = $tenantId;"Enter_the_Application_Id_of_Service_Here" = $serviceAadApplication.AppId };
408408
ReplaceInTextFile -configFilePath $configFile -dictionary $dictionary

7-AdvancedScenarios/1-call-api-obo/AppCreationScripts/sample.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Sample": {
33
"Title": "Angular single-page application authorizing .NET Core web API to call Microsoft Graph using on-behalf-of flow",
4-
"Level": 200,
4+
"Level": 300,
55
"Client": "Angular SPA",
66
"Service": ".NET Core web API",
77
"RepositoryUrl": "ms-identity-javascript-angular-tutorial",
@@ -74,7 +74,7 @@
7474
{
7575
"App": "client",
7676
"SettingKind": "Replace",
77-
"SettingFile": "\\..\\SPA\\src\\app\\authConfig.ts",
77+
"SettingFile": "\\..\\SPA\\src\\app\\auth-config.ts",
7878
"Mappings": [
7979
{
8080
"key": "Enter_the_Application_Id_Here",

7-AdvancedScenarios/1-call-api-obo/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ or download and extract the repository .zip file.
5757

5858
```console
5959
cd ms-identity-javascript-angular-tutorial
60-
cd 3-Authorization-II/1-call-api/API/TodoListAPI
60+
cd 7-AdvancedScenarios/1-call-api-obo/API
6161
dotnet restore
6262
```
6363

@@ -201,28 +201,25 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
201201

202202
> In the steps below, "ClientID" is the same as "Application ID" or "AppId".
203203
204-
1. Open the `SPA\src\app\authConfig.ts` file.
204+
1. Open the `SPA\src\app\auth-config.ts` file.
205205
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `ProfileSPA` app copied from the Azure portal.
206206
1. Find the key `Enter_the_Tenant_Info_Here` and replace the existing value with your Azure AD tenant ID.
207207
1. Find the key `Enter_the_Application_Id_of_Service_Here` and replace the existing value with the application ID (clientId) of `ProfileAPI` app copied from the Azure portal.
208208

209209
#### Configure Known Client Applications for service (ProfileAPI)
210210

211-
For a middle tier Web API (`ProfileAPI`) to be able to call a downstream Web API, the middle tier app needs to be granted the required permissions as well.
212-
However, since the middle tier cannot interact with the signed-in user, it needs to be explicitly bound to the client app in its **Azure AD** registration.
213-
This binding merges the permissions required by both the client and the middle tier Web Api and presents it to the end user in a single consent dialog. The user then consent to this combined set of permissions.
211+
For a middle-tier Web API (`ProfileAPI`) to be able to call a downstream web API, the middle-tier app needs to be granted the required permissions as well. However, since the middle-tier cannot interact with the signed-in user, it needs to be explicitly bound to the client app in its **Azure AD** registration. This binding merges the permissions required by both the client and the middle tier Web Api and presents it to the end user in a single consent dialog. The user then consent to this combined set of permissions.
214212

215-
To achieve this, you need to add the **Application Id** of the client app, in the Manifest of the Web API in the `knownClientApplications` property. Here's how:
213+
To achieve this, you need to add the **Application Id** of the client app, in the Manifest of the web API in the `knownClientApplications` property. Here's how:
216214

217215
1. In the [Azure portal](https://portal.azure.com), navigate to your `ProfileAPI` app registration, and select **Manifest** section.
218-
1. In the manifest editor, change the `"knownClientApplications": []` line so that the array contains
219-
the Client ID of the client application (`ProfileSPA`) as an element of the array.
216+
1. In the manifest editor, change the `"knownClientApplications": []` line so that the array contains the Client ID of the client application (`ProfileSPA`) as an element of the array.
220217

221-
For instance:
218+
For instance:
222219

223-
```json
224-
"knownClientApplications": ["ca8dca8d-f828-4f08-82f5-325e1a1c6428"],
225-
```
220+
```json
221+
"knownClientApplications": ["ca8dca8d-f828-4f08-82f5-325e1a1c6428"],
222+
```
226223

227224
1. **Save** the changes to the manifest.
228225

0 commit comments

Comments
 (0)