Skip to content

Commit e458eb3

Browse files
committed
Admin Consent Endpoint and ReadMe Updates
1 parent c36fb01 commit e458eb3

File tree

17 files changed

+257
-107
lines changed

17 files changed

+257
-107
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ Function ConfigureApplications
237237
# create the application
238238
$serviceAadApplication = New-AzureADApplication -DisplayName "WebApi-MultiTenant-v2" `
239239
-HomePage "https://localhost:44351/" `
240+
-ReplyUrls "https://localhost:44351/api/Home" `
240241
-AvailableToOtherTenants $True `
241242
-PasswordCredentials $key `
242243
-PublicClient $False
@@ -316,7 +317,7 @@ Function ConfigureApplications
316317
$clientAadApplication = New-AzureADApplication -DisplayName "WebApp-MultiTenant-v2" `
317318
-HomePage "https://localhost:44321/" `
318319
-LogoutUrl "https://localhost:44321/signout-oidc" `
319-
-ReplyUrls "https://localhost:44321/signin-oidc" `
320+
-ReplyUrls "https://localhost:44321/", "https://localhost:44321/signin-oidc" `
320321
-IdentifierUris "https://$tenantName/WebApp-MultiTenant-v2" `
321322
-AvailableToOtherTenants $True `
322323
-PasswordCredentials $key `
@@ -373,7 +374,7 @@ Function ConfigureApplications
373374
# Update config file for 'client'
374375
$configFile = $pwd.Path + "\..\ToDoListClient\appsettings.json"
375376
Write-Host "Updating the sample code ($configFile)"
376-
$dictionary = @{ "ClientId" = $clientAadApplication.AppId;"TenantId" = 'common';"Domain" = $tenantName;"ClientSecret" = $clientAppKey;"TodoListScope" = ("api://"+$serviceAadApplication.AppId+"/access_as_user") };
377+
$dictionary = @{ "ClientId" = $clientAadApplication.AppId;"TenantId" = 'common';"Domain" = $tenantName;"ClientSecret" = $clientAppKey;"RedirectUri" = $clientAadApplication.HomePage;"TodoListScope" = ("api://"+$serviceAadApplication.AppId+"/.default");"TodoListAppId" = $serviceAadApplication.AppId;"TodoListBaseAddress" = $serviceAadApplication.HomePage;"AdminConsentRedirectApi" = $serviceAadApplication.ReplyUrls };
377378
UpdateTextFile -configFilePath $configFile -dictionary $dictionary
378379
Write-Host ""
379380
Write-Host -ForegroundColor Green "------------------------------------------------------------------------------------------------"

4-WebApp-your-API/4-3-AnyOrg/AppCreationScripts/sample.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Kind": "WebApi",
1818
"Audience": "AzureADMultipleOrgs",
1919
"HomePage": "https://localhost:44351/",
20+
"ReplyUrls": "https://localhost:44351/api/Home",
2021
"PasswordCredentials": "Auto",
2122
"RequiredResourcesAccess": [
2223
{
@@ -39,7 +40,7 @@
3940
"Kind": "WebApp",
4041
"Audience": "AzureADMultipleOrgs",
4142
"HomePage": "https://localhost:44321/",
42-
"ReplyUrls": "https://localhost:44321/signin-oidc",
43+
"ReplyUrls": "https://localhost:44321/,https://localhost:44321/signin-oidc",
4344
"LogoutUrl": "https://localhost:44321/signout-oidc",
4445
"PasswordCredentials": "Auto",
4546
"RequiredResourcesAccess": [
@@ -112,9 +113,25 @@
112113
"key": "ClientSecret",
113114
"value": ".AppKey"
114115
},
116+
{
117+
"Key": "RedirectUri",
118+
"value": "client.HomePage"
119+
},
115120
{
116121
"key": "TodoListScope",
117-
"value": "service.Scope"
122+
"value": "service.ScopeDefault"
123+
},
124+
{
125+
"Key": "TodoListAppId",
126+
"value": "service.AppId"
127+
},
128+
{
129+
"Key": "TodoListBaseAddress",
130+
"value": "service.HomePage"
131+
},
132+
{
133+
"Key": "AdminConsentRedirectApi",
134+
"value": "service.ReplyUrls"
118135
}
119136
]
120137
}

4-WebApp-your-API/4-3-AnyOrg/Readme.md

Lines changed: 151 additions & 72 deletions
Large diffs are not rendered by default.
10.2 KB
Loading
92.1 KB
Loading
92.2 KB
Loading
325 KB
Loading
285 KB
Loading
345 KB
Loading
375 KB
Loading

0 commit comments

Comments
 (0)