{"Name":"<name of the role>","IsCustom":true,"Description":"Custom role with elevated privileges","Actions": ["*"],"NotActions": [],"DataActions": ["*"],"NotDataActions": [],"AssignableScopes": ["/subscriptions/<subscription-id>"]}
然后使用之前的定义更新角色权限,调用:
azroledefinitionupdate--role-definitionrole.json
Microsoft.Authorization/elevateAccess/action
此权限允许提升特权,并能够将权限分配给任何主体以访问 Azure 资源。它旨在授予 Entra ID 全局管理员,以便他们也可以管理 Azure 资源的权限。
我认为用户需要是 Entra ID 的全局管理员,以使提升调用有效。
# Call elevateazrest--methodPOST--uri"https://management.azure.com/providers/Microsoft.Authorization/elevateAccess?api-version=2016-07-01"# Grant a user the Owner roleazroleassignmentcreate--assignee"<obeject-id>"--role"Owner"--scope"/"