View RBAC roles available in Azure through PowerShell

View the current RBAC roles available in Azure using PowerShell.

John Savill

February 10, 2015

1 Min Read
View RBAC roles available in Azure through PowerShell

Q. How can I see through PowerShell all the Azure RBAC roles and the capabilities available?

A. The PowerShell script below creates output for all the Azure RBAC roles and shows the associated actions.

Switch-AzureMode -Name AzureResourceManagerforeach ($roledef in Get-AzureRoleDefinition) {    Write-Host 'Role: '$roledef.Name    Write-Host 'Actions'    (Get-AzureRoleDefinition -Name $roledef.Name).Actions    Write-Host 'NoActions'    (Get-AzureRoleDefinition -Name $roledef.Name).NoActions    Write-Host ([Environment]::NewLine)} 

A sample of the output is shown below.

Role: API Management Service ContributorActionsMicrosoft.ApiManagement/Services/*Microsoft.Authorization/*/readMicrosoft.Resources/subscriptions/resourceGroups/readMicrosoft.Resources/subscriptions/resourceGroups/resources/readMicrosoft.Resources/subscriptions/resourceGroups/deployments/*Microsoft.Insights/alertRules/*Microsoft.Support/*NoActionsRole: Application Insights Component ContributorActionsMicrosoft.Insights/components/*Microsoft.Insights/webtests/*Microsoft.Authorization/*/readMicrosoft.Resources/subscriptions/resourceGroups/readMicrosoft.Resources/subscriptions/resourceGroups/resources/readMicrosoft.Resources/subscriptions/resourceGroups/deployments/*Microsoft.Insights/alertRules/*Microsoft.Support/*NoActions

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like