Azure / Azure/azure-cli

Assign eligible role to management group

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

Description

**Related command**
[az role assignment create](https://learn.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#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 "" --role "Contributor" --scope "/providers/Microsoft.Management/managementGroups/" --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](https://github.com/user-attachments/assets/add48d8d-bd8f-4ec1-8aa7-ba96cd0ca2d9)

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.