Azure / Azure/azure-cli

`az role definition list` should be case-insensitive

Open
#32,563 2 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad Auto-Assign Auto-Resolve Azure CLI Team question RBAC
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

`az role definition list` is case-sensitive:

```sh
> az role definition list --scope / --name Reader
[
{
"assignableScopes": [
"/"
],
"createdBy": null,
"createdOn": "2015-02-02T21:55:09.880642+00:00",
"description": "View all resources, but does not allow you to make any changes.",
"id": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"name": "acdd72a7-3385-48ef-bd42-f606fba81ae7",
"permissions": [
{
"actions": [
"*/read"
],
"condition": null,
"conditionVersion": null,
"dataActions": [],
"notActions": [],
"notDataActions": []
}
],
"roleName": "Reader",
"roleType": "BuiltInRole",
"type": "Microsoft.Authorization/roleDefinitions",
"updatedBy": null,
"updatedOn": "2021-11-11T20:13:47.862868+00:00"
}
]
> az role definition list --scope / --name reader
[]
```

This is inconvenient when showing a role definition.

### Related command

`az role definition list`

### Errors

N/A

### Issue script & Debug output

N/A

### Expected behavior

`az role definition list` should be case-insensitive.

### Environment Summary

```
> az --version
azure-cli 2.77.0 *

core 2.77.0 *
telemetry 1.1.0

Extensions:
ssh 2.0.6

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\jiasli\.azure'
Extensions directory 'C:\Users\jiasli\.azure\cliextensions'

Python (Windows) 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.