I want to look up the roleDefinition ID in Azure to allow me to use a role name rather than ID - as it is more user friendly
This is what I have tried
param roleDefinitionName string = ''
resource existingRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
name: 'Storage Blob Data Reader'
}
output test string = 'ID is ${existingRoleDefinition.id}'
The output returned however is
/subscriptions/xxx/resourceGroups/rg-my-ab-h-uks-01/providers/Microsoft.Authorization/roleDefinitions/Storage Blob Data Reader
rather than 2a2b9908-6ea1-4ae2-8e65-a410df84e7d1
Can anyone help?