You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get-AzSubscription cmdlet returns the subscription ID, name and tenant for subscriptions that the account can access. The $SubscriptionName variable would end up being null with the actual code (line 169):
`$SubscriptionName = $subscription.Subscription.Name`
Also change the current context to use the specified subscription. It may be better to explicitly define the context before create the Service Principal (as the default for Role and Scope parameters are "Contributor" and the current subscription).
0 commit comments