Skip to content

Commit 39c7503

Browse files
author
Tiago Brenck
authored
Merge pull request #115 from Roadrunner67/issue/documentation
Use 'TodoListClient-and-Service' in documentation
2 parents a2b2573 + 6c33cb7 commit 39c7503

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

3.-Web-api-call-Microsoft-graph-for-personal-accounts/README-incremental-instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ If you want to use this automation:
9191
> Other ways of running the scripts are described in [App Creation Scripts](./AppCreationScripts/AppCreationScripts.md)
9292
9393
1. Once you've run the script, be sure to follow the manual steps. Indeed Azure AD PowerShell does not yet provide full control on applications consuming v2.0 tokens, even if this registration is already possible from the Azure portal:
94-
1. In the list of pages for the application registration of the *TodoListService-v2* application, select **Manifest**
94+
1. In the list of pages for the application registration of the *TodoListClient-and-Service* application, select **Manifest**
9595
- in the manifest, search for **"accessTokenAcceptedVersion"**, and replace **null** by **2**. This property lets Azure AD know that the Web API accepts v2.0 tokens
9696
- search for **signInAudience** and make sure it's set to **AzureADandPersonalMicrosoftAccount**
9797
- Select **Save**
98-
1. In the **Authentication** page for the *TodoListService-v2* application, check the `urn:ietf:wg:oauth:2.0:oob` reply URI so that the client can propose incremental consent to the user for the Web API when needed.
99-
1. In tthe application registration page for the *TodoListClient-v2* application, select the **Manifest** section:
98+
1. In the **Authentication** page for the *TodoListClient-and-Service* application, check the `urn:ietf:wg:oauth:2.0:oob` reply URI so that the client can propose incremental consent to the user for the Web API when needed.
99+
1. In tthe application registration page for the *TodoListClient-and-Service* application, select the **Manifest** section:
100100
- search for **signInAudience** and make sure it's set to **AzureADandPersonalMicrosoftAccount**
101101
- Select **Save**
102102

@@ -127,7 +127,7 @@ These instructions only show the differences with the first part.
127127
- Select the **Add permissions** button
128128
- [Optional] if you are a tenant admin, and agree to grant the admin consent to the web api, select **Grant admin consent for {your tenant domain}**.
129129
1. [Otherwise] If you have not granted admin consent to the Web API in the previous optional step, select **Authentication** in the list of pages and there:
130-
- Check the `urn:ietf:wg:oauth:2.0:oob` Redirect URI checkbox. This is so that the client can propose incremental consent to the user for the downstream web apis used by our *TodoListService-v2* Web API.
130+
- Check the `urn:ietf:wg:oauth:2.0:oob` Redirect URI checkbox. This is so that the client can propose incremental consent to the user for the downstream web apis used by our *TodoListService* Web API.
131131
- Select **Save**
132132
1. [Optional] Select the **Manifest** section and:
133133
- in the manifest, search for **"accessTokenAcceptedVersion"**, and see that its value is **2**. This property lets Azure AD know that the Web API accepts v2.0 tokens
@@ -147,8 +147,8 @@ This constrain is ensured by `ida:Tenant` in `TodoListClient\App.Config` having
147147
#### Configure the TodoListService C# project
148148

149149
1. Open the solution in Visual Studio.
150-
1. In the *TodoListService-v2* project, open the `appsettings.json` file.
151-
1. Find the `ClientSecret` property and replace the existing value with the key you saved during the creation of the `TodoListService-v2` app, in the Azure portal.
150+
1. In the *TodoListClient-and-Service* project, open the `appsettings.json` file.
151+
1. Find the `ClientSecret` property and replace the existing value with the key you saved during the creation of the `TodoListClient-and-Service` app, in the Azure portal.
152152

153153
#### Configure the TodoListClient C# project
154154

3.-Web-api-call-Microsoft-graph-for-personal-accounts/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ If you want to use this automation:
113113
```
114114
> Other ways of running the scripts are described in [App Creation Scripts](./AppCreationScripts/AppCreationScripts.md)
115115
116-
1. In the list of pages for the application registration of the `TodoListService-v2` application, select **Manifest**
116+
1. In the list of pages for the application registration of the `TodoListClient-and-Service` application, select **Manifest**
117117
- in the manifest, search for **"accessTokenAcceptedVersion"**, and replace **null** by **2**. This property lets Azure AD know that the Web API accepts v2.0 tokens
118118
- Select **Save**
119119

@@ -194,9 +194,9 @@ Accepted tenants can have the following values:
194194
Note: if you used the setup scripts, the changes below will have been applied for you
195195

196196
1. Open the solution in Visual Studio.
197-
1. In the *TodoListService-v2* project, open the `appsettings.json` file.
198-
1. Find the `ClientId` property and replace the value with the Application ID (Client ID) property of the *TodoListService-v2* application, that you registered earlier.
199-
1. Find the `ClientSecret` property and replace the existing value with the key you saved during the creation of the `TodoListService-v2` app, in the Azure portal.
197+
1. In the *TodoListService* project, open the `appsettings.json` file.
198+
1. Find the `ClientId` property and replace the value with the Application ID (Client ID) property of the *TodoListClient-and-Service* application, that you registered earlier.
199+
1. Find the `ClientSecret` property and replace the existing value with the key you saved during the creation of the `TodoListClient-and-Service` app, in the Azure portal.
200200
1. [Optional] if you want to limit sign-in to users in your organization, also update the following properties:
201201
- `Domain`, replacing the existing value with your AAD tenant domain, for example, contoso.onmicrosoft.com.
202202
- `TenantId`, replacing the existing value with the Tenant ID.
@@ -205,9 +205,9 @@ Note: if you used the setup scripts, the changes below will have been applied fo
205205

206206
Note: if you used the setup scripts, the changes below will have been applied for you
207207

208-
1. In the TodoListClient project, open `App.config`.
209-
1. Find the app key `ida:ClientId` and replace the value with the ApplicationID (Client ID) for the *TodoListClient-v2* app copied from the app registration page.
210-
1. Find the app key `todo:TodoListScope` and replace the value with the scope of the TodoListService-v2 application copied from the app registration in the **Expose an API** tab, but replace the scope by `.default` (of the form ``api://<Application ID of service>/.default`` if you followed the instructions above)
208+
1. In the *TodoListClient* project, open `App.config`.
209+
1. Find the app key `ida:ClientId` and replace the value with the ApplicationID (Client ID) for the *TodoListClient-and-Service* app copied from the app registration page.
210+
1. Find the app key `todo:TodoListScope` and replace the value with the scope of the TodoListClient-and-Service application copied from the app registration in the **Expose an API** tab, but replace the scope by `.default` (of the form ``api://<Application ID of service>/.default`` if you followed the instructions above)
211211
1. [Optional] If you want your application to work only in your organization (only in your tenant) you'll also need to Find the app key `ida:Tenant` and replace the value with your AAD Tenant ID (GUID). Alternatively you can also use your AAD tenant Name (for example, contoso.onmicrosoft.com)
212212
1. [Optional] If you changed the default URL for your service application, find the app key `todo:TodoListBaseAddress` and replace the value with the base address of the TodoListService project.
213213

@@ -224,7 +224,7 @@ This behavior is expected as you are not authenticated. The WPF application will
224224

225225
Explore the sample by signing in into the TodoList client, adding items to the To Do list, removing the user account (clearing the cache), and starting again. As explained, if you stop the application without removing the user account, the next time you run the application, you won't be prompted to sign in again. That is because the sample implements a persistent cache for MSAL, and remembers the tokens from the previous run.
226226

227-
NOTE: Remember, the To-Do list is stored in memory in this `TodoListService-v2` sample. Each time you run the TodoListService API, your To-Do list will get emptied.
227+
NOTE: Remember, the To-Do list is stored in memory in this *TodoListService* sample. Each time you run the TodoListService API, your To-Do list will get emptied.
228228

229229
## How was the code created
230230

3.-Web-api-call-Microsoft-graph-for-personal-accounts/TodoListClient/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
ClientID (ApplicationID) of your application as registered in the App Registration (Preview) under Azure Active Directory
2626
in https://portal.azure.com
2727
-->
28-
<add key="ida:ClientId" value="[Enter_client_ID_Of_TodoListClient-v2_from_Azure_Portal,_e.g._01234567-89ab-cdef-0123-456789abcdef]"/>
28+
<add key="ida:ClientId" value="[Enter_client_ID_Of_TodoListClient-and-Service_from_Azure_Portal,_e.g._01234567-89ab-cdef-0123-456789abcdef]"/>
2929

3030
<!--
3131
todo:TodoListScope is the scope of the Web API you want to call. This can be:
3232
- a scope for a V2 application (for instance api://b3682cc7-8b30-4bd2-aaba-080c6bf0fd31/access_as_user)
3333
- a scope corresponding to a V1 application (for instance <GUID>/user_impersonation, where <GUID> is the
3434
clientId of a V1 application, created in the https://portal.azure.com portal.
3535
-->
36-
<add key="todo:TodoListScope" value="api://[Enter_client_ID_Of_TodoListService-v2_from_Azure_Portal,_e.g._01234567-89ab-cdef-0123-456789abcdef]/access_as_user"/>
36+
<add key="todo:TodoListScope" value="api://[Enter_client_ID_Of_TodoListClient-and-Service_from_Azure_Portal,_e.g._01234567-89ab-cdef-0123-456789abcdef]/access_as_user"/>
3737
<add key="todo:TodoListBaseAddress" value="https://localhost:44351/"/>
3838
</appSettings>
3939
</configuration>

3.-Web-api-call-Microsoft-graph-for-personal-accounts/TodoListService/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"AzureAd": {
33
"Instance": "https://login.microsoftonline.com/",
4-
"ClientId": "[Enter_client_ID_Of_TodoListService-v2_from_Azure_Portal,_e.g._2ec40e65-ba09-4853-bcde-bcb60029e596]",
4+
"ClientId": "[Enter_client_ID_Of_TodoListClient-and-Service_from_Azure_Portal,_e.g._2ec40e65-ba09-4853-bcde-bcb60029e596]",
55
"ClientSecret": "[Enter_client_secret_as_added_fom_the_certificates_&_secrets_page_from_your_app_registration]",
66

77
/*

0 commit comments

Comments
 (0)