Skip to content

Commit e1f82c9

Browse files
authored
Az.StackHCI - Pass GraphAccessToken to Connect-AzAccount (#15193)
New-AzRoleAssignment Cmdlet needs graph token, so during Connect-AzAccount pass GraphAccessToken
1 parent b877850 commit e1f82c9

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)