File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,14 +33,15 @@ function Initialize-AzEnvironment{
3333 $fullUri = $CloudARMEndpoint.TrimEnd (' /' )+ " /metadata/endpoints?api-version=2015-01-01"
3434 $response = Invoke-RestMethod - Uri $fullUri - ErrorAction Stop - UseBasicParsing - TimeoutSec 30 - Verbose
3535 Write-Verbose - Message " Endpoints: $ ( ConvertTo-Json $response ) " - Verbose
36+ $loginEndpoint = $response.authentication.loginEndpoint.TrimEnd (' /' ) + " /"
3637 $endpoints = @ {
37- ActiveDirectoryAuthority = $response .authentication. loginEndpoint.TrimEnd ( ' / ' ) + " / "
38+ ActiveDirectoryAuthority = $loginEndpoint
3839 ActiveDirectoryServiceEndpointResourceId = $response.authentication.audiences [0 ]
3940 ResourceManagerUrl = $CloudARMEndpoint
4041 GalleryUrl = $response.galleryEndpoint
4142 GraphUrl = $response.graphEndpoint
4243 GraphEndpointResourceId = $response.graphEndpoint
43- EnableAdfsAuthentication = $true
44+ EnableAdfsAuthentication = $loginEndpoint .EndsWith ( ' /adfs/ ' , [ System.StringComparison ]::OrdinalIgnoreCase)
4445 }
4546
4647 Remove-AzEnvironment - Name $Name - ErrorAction Ignore | Out-Null
You can’t perform that action at this time.
0 commit comments