Using the Azure CLI it is possible to obtain a role by its name like this: az role definition list --name MyRoleName
Using the API (or any SDK, since these use the API) I am only able to get roles by ID.
IDs are non-user-friendly Azure generated UUIDs.
Expected behavior
API documentation for Get states that it "Gets a role definition by name", while GetByID "Gets a role definition by ID".
Link to sample
https://learn.microsoft.com/en-us/rest/api/authorization/role-definitions
Library name and version
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization
Language of the Sample
Sample Issue Type
Issue details
Using the Azure CLI it is possible to obtain a role by its name like this: az role definition list --name MyRoleName Using the API (or any SDK, since these use the API) I am only able to get roles by ID. IDs are non-user-friendly Azure generated UUIDs.
Expected behavior
API documentation for Get states that it "Gets a role definition by name", while GetByID "Gets a role definition by ID".
Actual behavior
Both get the role by ID.
Reproduction Steps
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}?api-version=2022-04-01
GET https://management.azure.com/roleDefinitionId?disambiguation_dummy&api-version=2022-04-01
Environment
Any