File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4541,11 +4541,12 @@ function global:Invoke-SgwServerSsoAuthentication {
45414541 Write-Verbose "Retrieving SAML identity provider URI from StorageGRID admin node"
45424542
45434543 if ($Server.AccountId) {
4544- $Body = "{`"accountId`":`"$($ Server.AccountId)`"}"
4544+ $AccountId = $ Server.AccountId
45454545 }
45464546 else {
4547- $Body = "{`"accountId`":`"0`"}"
4547+ $AccountId = 0
45484548 }
4549+ $Body = "{`"accountId`":`"$AccountId`"}"
45494550
45504551 Write-Verbose "Body: $Body"
45514552
@@ -4576,7 +4577,7 @@ function global:Invoke-SgwServerSsoAuthentication {
45764577
45774578 try {
45784579 $Uri = $Server.BaseUri + "/saml-response"
4579- $Body = "SAMLResponse=" + [System.Net.WebUtility]::UrlEncode($SAMLResponse) + "&RelayState=0"
4580+ $Body = "SAMLResponse=" + [System.Net.WebUtility]::UrlEncode($SAMLResponse) + "&RelayState=" + $AccountId
45804581 $TokenResponse = Invoke-WebRequest -Method POST -Uri $Uri -Session StorageGridSession -ContentType "application/x-www-form-urlencoded" -Body $Body
45814582
45824583 }
You can’t perform that action at this time.
0 commit comments