Available Custom Roles
OpenOps Azure Benchmark Reader
Creates theOpenOps Azure Benchmark Reader custom role with read-only permissions for running Azure cost optimization benchmarks. This role includes:
- Compute resources: Virtual machines, managed disks, snapshots, and images
- Networking: Network interfaces and public IP addresses
- App Services: Web apps, App Service Plans, and App Service Environments
- Databases: Azure SQL servers, databases, and elastic pools
- Cost and billing: Cost Management queries, consumption usage details, and billing properties
- Monitoring: Azure Monitor metrics
- Optimization: Azure Advisor recommendations and metadata
Installation Steps
Before creating the custom role, you must configure theAssignableScopes parameter to specify where this role can be assigned.
Configure AssignableScopes
Choose the appropriate scope for your deployment:Single subscription
Single subscription
JSON:Bicep parameter:
Multiple subscriptions
Multiple subscriptions
Use this when you want the role available in specific subscriptions but not across the entire management group.JSON:Bicep parameter:
Management group
Management group
Use this only if you want the custom role available across the entire management group scope.JSON:Bicep parameter:
Option 1: Deploy with Bicep (Recommended)
- Update the
assignableScopesparameter in the command below with your subscription ID(s):
- For multiple subscriptions:
- This is a subscription-scoped deployment. For management group scope, see the management group configuration above
Option 2: Deploy with Azure CLI and JSON
-
Edit the
AssignableScopesfield inOpenOps Azure Benchmark Reader.role-definition.jsonwith your subscription ID(s). - Create the role:
- To update an existing role:
Assign the Role to a Service Principal
After creating the custom role, assign it to the service principal that OpenOps uses to connect to Azure.Assign at subscription scope
Assign in multiple subscriptions
Run the assignment once per subscription:Assign at management group scope
Verification
Verify the role definition was created:Cost Management Access
For subscription-scope cost queries, the role includesMicrosoft.CostManagement/query/action for the POST query API.
Azure Cost Management access commonly requires related read permissions in billing and cost surfaces. This role includes:
Microsoft.CostManagement/query/actionMicrosoft.CostManagement/*/readMicrosoft.Consumption/*/readMicrosoft.Billing/billingPeriods/readMicrosoft.Billing/billingProperty/readMicrosoft.Resources/subscriptions/readMicrosoft.Resources/subscriptions/resourceGroups/read
If you update the role and still get
RBACAccessDenied, wait a few minutes and retry. Azure RBAC propagation is not always immediate.For subscriptions under EA or certain billing setups, cost visibility may also depend on billing-side settings such as view charges access.Important Notes
AssignableScopesis required for all Azure custom roles- A management group is above subscriptions in the Azure hierarchy
- If you use multiple subscriptions in
AssignableScopes, the role is limited to those subscriptions only - Role creation requires permission to manage custom roles for every scope listed in
AssignableScopes
