Skip to content

[Role] az role assignment create: Support ForeignGroup for --assignee-principal-type#19132

Merged
jiasli merged 1 commit intoAzure:devfrom
jiasli:foreign-group
Aug 6, 2021
Merged

[Role] az role assignment create: Support ForeignGroup for --assignee-principal-type#19132
jiasli merged 1 commit intoAzure:devfrom
jiasli:foreign-group

Conversation

@jiasli
Copy link
Copy Markdown
Member

@jiasli jiasli commented Aug 5, 2021

Description

Fix #18616

az role assignment create: Support ForeignGroup for --assignee-principal-type

Azure CLI overrides PrincipalType in #16056 because of REST spec issue Azure/azure-rest-api-specs#11830.

The code is copied from Python SDK azure.mgmt.authorization.v2020_04_01_preview.models._authorization_management_client_enums.PrincipalType

foreign_group = "ForeignGroup"

This PR is still a workaround and the ultimate solution should be the fix for Azure/azure-rest-api-specs#11830.

Testing Guide

> az role assignment create -h

    --assignee-principal-type     : Use with --assignee-object-id to avoid errors caused by
                                    propagation latency in AAD Graph.  Allowed values: ForeignGroup,
                                    Group, ServicePrincipal, User.

@jiasli jiasli requested a review from evelyn-ys as a code owner August 5, 2021 06:27
@jiasli jiasli requested a review from yonzhan August 5, 2021 06:30
@jiasli jiasli self-assigned this Aug 5, 2021
@jiasli jiasli added this to the Aug 2021 (2021-09-07) milestone Aug 5, 2021
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Aug 5, 2021

Support ForeignGroup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--assignee-principal-type does not allow ForeignGroup

3 participants