I have a VM in Azure i have assigned an Identity and i can login using
az login --identity
When i do that , it only displays the Subscription that the VM is in . I have a number of subscriptions and I want that VM to be able to view all subscriptions and be able to access all resources in all subscriptions .
I have tried to configure Role assignment but couldnt see anything that would allow the VM to access all subscriptions
How can i configure the VM identity to access all subscriptions and all resources ?
How can i assign a VM in Azure to view all subscriptions using Managed Identity?
To assign a role to the VM identity on different subscriptions, follow these steps
Subscription > Access control (IAM) > Add role assignment > Select the role > User, group, or service principal > Enter your VM Name at search place.
Note: If you select Managed identity, The managed identity will be access within the same subscription, it won't display in another subscription
.
Output: