0
votes

My Azure account having one subscription is added as a contributor to another Azure account. Using Login-AzureRmAccount in PowerShell, I login to my account and Get-AzureSubscription returns only my own subscription. On the Azure portal, I can switch between these two subscriptions and create/remove resources on the other subscription.

I have checked Select-AzureSubscription, and it can be used in case Get-AzureSubscription returns multiple accounts to choose among them.

I also do not have the credentials of the other account to login manually.

Is there any way to access my contributor-role subscription in PowerShell and run Azure scripts on it?

1

1 Answers

2
votes

"Contributor" is an RBAC (Role based access control) role, so you have access to the subscription throught Azure Resource Manager. To find this subscription in PowerShell, you can use the Get-AzureRmSubscription cmdlet instead of Get-AzureSubscription. Then you can use the cmdlet Select-AzureRmSubscription to select the subscription instead of Select-AzureSubscription.