Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

Assign eligible role to management group #30332

Open pimvd opened 2 days ago

pimvd commented 2 days ago

Related command az role assignment create

Is your feature request related to a problem? Please describe. In Azure Portal I am assigning roles to a Management Group. I want to create an Eligible role assignment (which is recommended) via Azure CLI. This is currently in preview in the Azure Portal and not available in the Azure CLI. I would like to create the eligible role via Azure CLI.

Describe the solution you'd like I would like to be able to choose a Assignment type, Assignment duration, Start date and time and End date and time or expirationDuration (e.g. 1 year, ISO 8601 https://en.wikipedia.org/wiki/ISO_8601#Durations ) like in the Azure Portal. Example: az role assignment create --assignee "<Group GUID>" --role "Contributor" --scope "/providers/Microsoft.Management/managementGroups/<MANAGEMENT GROUP ID>" --assignment-type "Eligible" --assignment-duration "TimeBound" --expiration-duration "P1Y"

Describe alternatives you've considered None

Additional context Basically I want to be able to use the recommended assignment type, Eligible, via Azure CLI. Image

yonzhan commented 2 days ago

Thank you for opening this issue, we will look into it.