Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Registration/RegisterWithAzure.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ function Initialize-AzEnvironment{
$fullUri = $CloudARMEndpoint.TrimEnd('/')+"/metadata/endpoints?api-version=2015-01-01"
$response = Invoke-RestMethod -Uri $fullUri -ErrorAction Stop -UseBasicParsing -TimeoutSec 30 -Verbose
Write-Verbose -Message "Endpoints: $(ConvertTo-Json $response)" -Verbose
$loginEndpoint = $response.authentication.loginEndpoint.TrimEnd('/') + "/"
$endpoints = @{
ActiveDirectoryAuthority = $response.authentication.loginEndpoint.TrimEnd('/') + "/"
ActiveDirectoryAuthority = $loginEndpoint
ActiveDirectoryServiceEndpointResourceId = $response.authentication.audiences[0]
ResourceManagerUrl = $CloudARMEndpoint
GalleryUrl = $response.galleryEndpoint
GraphUrl = $response.graphEndpoint
GraphEndpointResourceId = $response.graphEndpoint
EnableAdfsAuthentication = $true
EnableAdfsAuthentication = $loginEndpoint.EndsWith('/adfs/', [System.StringComparison]::OrdinalIgnoreCase)
}

Remove-AzEnvironment -Name $Name -ErrorAction Ignore | Out-Null
Expand Down