Skip to content

Commit 952a196

Browse files
author
Kalyan Krishna
committed
The web api project upgraded
1 parent a142345 commit 952a196

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

4-WebApp-your-API/AppCreationScripts/Configure.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Function ConfigureApplications
334334
# Update config file for 'client'
335335
$configFile = $pwd.Path + "\..\Client\appsettings.json"
336336
Write-Host "Updating the sample code ($configFile)"
337-
$dictionary = @{ "Domain" = $tenantName;"TenantId" = $tenantId;"ClientId" = $clientAadApplication.AppId;"ClientSecret" = $clientAppKey;"TodoListScope" = ("api://"+$serviceAadApplication.AppId+"/user_impersonation");"TodoListBaseAddress" = $serviceAadApplication.HomePage };
337+
$dictionary = @{ "Domain" = $tenantName;"TenantId" = $tenantId;"ClientId" = $clientAadApplication.AppId;"ClientSecret" = $clientAppKey;"TodoListScope" = ("api://"+$serviceAadApplication.AppId+"/access_as_user");"TodoListBaseAddress" = $serviceAadApplication.HomePage };
338338
UpdateTextFile -configFilePath $configFile -dictionary $dictionary
339339

340340
Add-Content -Value "</tbody></table></body></html>" -Path createdApps.html

4-WebApp-your-API/Client/appsettings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"AzureAd": {
33
"Instance": "https://login.microsoftonline.com/",
4-
"Domain": "kkaad.onmicrosoft.com",
5-
"TenantId": "979f4440-75dc-4664-b2e1-2cafa0ac67d1",
6-
"ClientId": "30fcdffd-4f38-49ba-bceb-d8063ebe4b0e",
4+
"Domain": "[Enter the domain of your tenant, e.g. contoso.onmicrosoft.com]",
5+
"TenantId": "[Enter 'common', or 'organizations' or the Tenant Id (Obtained from the Azure portal. Select 'Endpoints' from the 'App registrations' blade and use the GUID in any of the URLs), e.g. da41245a5-11b3-996c-00a8-4d99re19f292]",
6+
"ClientId": "[Enter the Client Id (Application ID obtained from the Azure portal), e.g. ba74781c2-53c2-442a-97c2-3d60re42f403]",
77
"CallbackPath": "/signin-oidc",
88
"SignedOutCallbackPath ": "/signout-callback-oidc",
99

1010
// To call an API
11-
"ClientSecret": "m9lTgLGbq7CXXhfTtQCak3sYdYnqyQsbzBh5ol+X9zA= "GIgeZIAiicWVD4ImenEIx8TM4BPAfTxCGtzstVChkKs=";
11+
"ClientSecret": "[Copy the client secret added to the app from the Azure portal]"
1212
},
1313
"TodoList": {
1414
/*
@@ -17,8 +17,8 @@
1717
- a scope corresponding to a V1 application (for instance <GUID>/user_impersonation, where <GUID> is the
1818
clientId of a V1 application, created in the https://portal.azure.com portal.
1919
*/
20-
"TodoListScope": "api://8f085429-c424-45c4-beb3-75f6f0a7924f/user_impersonation",
21-
"TodoListBaseAddress": "https://localhost:44351/",
20+
"TodoListScope": "api://[Enter_client_ID_Of_TodoListService-v2_from_Azure_Portal,_e.g._2ec40e65-ba09-4853-bcde-bcb60029e596]/access_as_user",
21+
"TodoListBaseAddress": "https://localhost:44351/"
2222

2323
},
2424
"Logging": {

4-WebApp-your-API/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Open the solution in Visual Studio to configure the projects
172172

173173
#### Configure the service project
174174

175-
> Note: if you used the setup scripts, the changes below will have been applied for you
175+
Note: if you had used the automation to setup your application mentioned in [Step 2: Register the sample application with your Azure Active Directory tenant](#step-2-register-the-sample-application-with-your-azure-active-directory-tenant), the changes below would have been applied by the scripts.
176176

177177
1. Open the `TodoListService\appsettings.json` file
178178
1. Find the app key `Domain` and replace the existing value with your Azure AD tenant name.
@@ -181,7 +181,7 @@ Open the solution in Visual Studio to configure the projects
181181

182182
#### Configure the client project
183183

184-
> Note: if you used the setup scripts, the changes below will have been applied for you
184+
Note: if you had used the automation to setup your application mentioned in [Step 2: Register the sample application with your Azure Active Directory tenant](#step-2-register-the-sample-application-with-your-azure-active-directory-tenant), the changes below would have been applied by the scripts.
185185

186186
1. Open the `Client\appsettings.json` file
187187
1. Find the app key `Domain` and replace the existing value with your Azure AD tenant name.

0 commit comments

Comments
 (0)