Skip to content

Unable to add Service Principal with Role to Multiple Subscriptions #15860

Answered by dingmeng-xue
chaddaignault asked this question in Q&A
Discussion options

You must be logged in to vote

@chaddaignault , New-AzRoleAssignment respects default subscription in Azure context. You need to change the context Set-AzContext -SubscriptionId <> to switch another subscription and then call New-AzRoleAssignment again.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chaddaignault
Comment options

Answer selected by dcaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants