← cd ~/roles
// roles/azure · management-and-governance
Savings plan PurchaserAzure built-in role
Lets you purchase savings plans
| Role ID | 3d24a3a0-c154-4f6f-a5ed-adc8e01ddb74 |
|---|---|
| Category | Management-and-governance |
| Actions | 10 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Resources/subscriptions/read | Gets the list of subscriptions. |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.Capacity/register/action | Registers the Capacity resource provider and enables the creation of Capacity resources. |
Microsoft.Capacity/catalogs/read | Read catalog of Reservation |
Microsoft.Authorization/roleAssignments/read | Get information about a role assignment. |
Microsoft.BillingBenefits/savingsPlanOrders/write | Create a savings plan orders |
Microsoft.BIllingBenefits/register/action | Registers the BillingBenefits resource provider and enables the creation of BillingBenefits resources. |
Microsoft.Support/supporttickets/write | Allows creating and updating a support ticket |
Microsoft.Billing/billingProperty/read | Gets the billing properties for a subscription |
Microsoft.CostManagement/benefitRecommendations/read | List single or shared recommendations for Microsoft benefits. |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Savings plan Purchaser" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Savings plan Purchaser" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, '3d24a3a0-c154-4f6f-a5ed-adc8e01ddb74')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3d24a3a0-c154-4f6f-a5ed-adc8e01ddb74')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "3d24a3a0-c154-4f6f-a5ed-adc8e01ddb74"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other management-and-governance roles
- Service Group Contributor · 1 permission
- Template Spec Reader · 1 permission
- Carbon Optimization Reader · 2 permissions
- Hierarchy Settings Administrator · 2 permissions
- Reservations Reader · 2 permissions
- Service Group Reader · 2 permissions
- Advisor Reviews Reader · 3 permissions
- Managed Application Operator Role · 3 permissions