Skip to content

Commit df04152

Browse files
msJinLeidigot007
andauthored
Az.StackHCI - Pass GraphAccessToken to Connect-AzAccount (#15193) (#15203)
New-AzRoleAssignment Cmdlet needs graph token, so during Connect-AzAccount pass GraphAccessToken Co-authored-by: digot007 <[email protected]>
1 parent f1f2eff commit df04152

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/StackHCI/Az.StackHCI.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,11 +910,11 @@ param(
910910

911911
if([string]::IsNullOrEmpty($TenantId))
912912
{
913-
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -Scope Process | Out-Null
913+
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -GraphAccessToken $GraphAccessToken -Scope Process | Out-Null
914914
}
915915
else
916916
{
917-
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -TenantId $TenantId -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -Scope Process | Out-Null
917+
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -TenantId $TenantId -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -GraphAccessToken $GraphAccessToken -Scope Process | Out-Null
918918
}
919919

920920
Write-Progress -Id $MainProgressBarId -activity $ProgressActivityName -status $ConnectingToAzureAD -percentcomplete 35

0 commit comments

Comments
 (0)