Skip to content

Commit

Permalink
Az.StackHCI - Pass GraphAccessToken to Connect-AzAccount (#15193)
Browse files Browse the repository at this point in the history
New-AzRoleAssignment Cmdlet needs graph token, so during Connect-AzAccount pass GraphAccessToken
  • Loading branch information
digot007 authored Jun 8, 2021
1 parent b877850 commit e1f82c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StackHCI/Az.StackHCI.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,11 @@ param(

if([string]::IsNullOrEmpty($TenantId))
{
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -Scope Process | Out-Null
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -GraphAccessToken $GraphAccessToken -Scope Process | Out-Null
}
else
{
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -TenantId $TenantId -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -Scope Process | Out-Null
Connect-AzAccount -Environment $ConnectAzAccountEnvironmentName -TenantId $TenantId -SubscriptionId $SubscriptionId -AccessToken $ArmAccessToken -AccountId $AccountId -GraphAccessToken $GraphAccessToken -Scope Process | Out-Null
}

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

0 comments on commit e1f82c9

Please sign in to comment.