@@ -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 " ------------------------------------------------------------------------------------------------"
0 commit comments