azureblog.co.uk
← cd ~/roles
// roles/azure · hybrid-multicloud

Azure Stack HCI VM ReaderAzure built-in role

Grants permissions to view VMs

Role ID4b3fe76c-f777-4d24-a2d7-b027b0f7b273
CategoryHybrid-multicloud
Actions42
Data actions0

What it can do

PermissionWhat it allows
Microsoft.AzureStackHCI/VirtualMachines/ReadGets/Lists virtual machine resource
Microsoft.AzureStackHCI/virtualMachineInstances/ReadGets/Lists virtual machine instance resource
Microsoft.AzureStackHCI/VirtualMachines/Extensions/ReadGets/Lists virtual machine extensions resource
Microsoft.AzureStackHCI/VirtualNetworks/ReadGets/Lists virtual networks resource
Microsoft.AzureStackHCI/LogicalNetworks/ReadGets/Lists logical networks resource
Microsoft.AzureStackHCI/NetworkInterfaces/ReadGets/Lists network interfaces resource
Microsoft.AzureStackHCI/VirtualHardDisks/ReadGets/Lists virtual hard disk resource
Microsoft.AzureStackHCI/StorageContainers/ReadGets/Lists storage containers resource
Microsoft.AzureStackHCI/GalleryImages/ReadGets/Lists gallery images resource
Microsoft.AzureStackHCI/MarketplaceGalleryImages/ReadGets/Lists market place gallery images resource
Microsoft.AzureStackHCI/NetworkSecurityGroups/ReadGets/Lists a network security group resource
Microsoft.AzureStackHCI/NetworkSecurityGroups/SecurityRules/ReadGets/Lists security rule resource
Microsoft.HybridCompute/licenses/readReads any Azure Arc licenses
Microsoft.HybridCompute/machines/extensions/readReads any Azure Arc extensions
Microsoft.HybridCompute/machines/licenseProfiles/readReads any Azure Arc licenseProfiles
Microsoft.HybridCompute/machines/patchAssessmentResults/readReads any Azure Arc patchAssessmentResults
Microsoft.HybridCompute/machines/patchAssessmentResults/softwarePatches/readReads any Azure Arc patchAssessmentResults/softwarePatches
Microsoft.HybridCompute/machines/patchInstallationResults/readReads any Azure Arc patchInstallationResults
Microsoft.HybridCompute/machines/patchInstallationResults/softwarePatches/readReads any Azure Arc patchInstallationResults/softwarePatches
Microsoft.HybridCompute/machines/readRead any Azure Arc machines
Microsoft.HybridCompute/privateLinkScopes/networkSecurityPerimeterConfigurations/readReads any Azure Arc networkSecurityPerimeterConfigurations
Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections/readRead any Azure Arc privateEndpointConnections
Microsoft.HybridCompute/privateLinkScopes/readRead any Azure Arc privateLinkScopes
Microsoft.Insights/AlertRules/WriteCreate or update a classic metric alert
Microsoft.Insights/AlertRules/DeleteDelete a classic metric alert
Microsoft.Insights/AlertRules/ReadRead a classic metric alert
Microsoft.Insights/AlertRules/Activated/ActionClassic metric alert activated
Microsoft.Insights/AlertRules/Resolved/ActionClassic metric alert resolved
Microsoft.Insights/AlertRules/Throttled/ActionClassic metric alert rule throttled
Microsoft.Insights/AlertRules/Incidents/ReadRead a classic metric alert incident
Microsoft.Resources/deployments/readGets or lists deployments.
Microsoft.Resources/deployments/exportTemplate/actionExport template for a deployment
Microsoft.Resources/deployments/operations/readGets or lists deployment operations.
Microsoft.Resources/deployments/operationstatuses/readGets or lists deployment operation statuses.
Microsoft.Resources/subscriptions/resourcegroups/deployments/readGets or lists deployments.
Microsoft.Resources/subscriptions/resourcegroups/deployments/operations/readGets or lists deployment operations.
Microsoft.Resources/subscriptions/resourcegroups/deployments/operationstatuses/readGets or lists deployment operation statuses.
Microsoft.ResourceHealth/availabilityStatuses/readGets the availability statuses for all resources in the specified scope
Microsoft.Authorization/*/readAny read operation on anything under Microsoft.Authorization
Microsoft.Resources/subscriptions/readGets the list of subscriptions.
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.
Microsoft.Resources/subscriptions/operationresults/readGet the subscription operation results.

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "Azure Stack HCI VM Reader" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "Azure Stack HCI VM Reader" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, '4b3fe76c-f777-4d24-a2d7-b027b0f7b273')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '4b3fe76c-f777-4d24-a2d7-b027b0f7b273')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "4b3fe76c-f777-4d24-a2d7-b027b0f7b273"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other hybrid-multicloud roles

Find the smallest role for a task →