{Graph} az ad user get-member-groups: Use /getMemberGroups API #22337
Merged
jiasli merged 3 commits intoAzure:betafrom May 11, 2022
Merged
{Graph} az ad user get-member-groups: Use /getMemberGroups API #22337jiasli merged 3 commits intoAzure:betafrom
az ad user get-member-groups: Use /getMemberGroups API #22337jiasli merged 3 commits intoAzure:betafrom
Conversation
Collaborator
|
Graph |
calvinhzy
approved these changes
May 11, 2022
jiasli
commented
May 11, 2022
| def delete_application(client, identifier): | ||
| object_id = _resolve_application(client, identifier) | ||
| client.application_delete(id=object_id) | ||
| client.application_delete(object_id) |
Member
Author
There was a problem hiding this comment.
If the function takes positional argument, the best practice is to pass the argument as positional argument too, instead of as a keyword argument.
jiasli
commented
May 11, 2022
| return result | ||
|
|
||
| def user_get(self, id): | ||
| def user_get(self, id_or_upn): |
Member
Author
There was a problem hiding this comment.
We honor the API's name:
GET /users/{id | userPrincipalName}
jiasli
commented
May 11, 2022
| c.argument('account_enabled', arg_type=get_three_state_flag(), help='enable the user account') | ||
| c.argument('password', help='user password') | ||
| c.argument('upn_or_object_id', options_list=['--id', c.deprecate(target='--upn-or-object-id', redirect='--id', hide=True)], help='The object ID or principal name of the user for which to get information') | ||
| c.argument('upn_or_object_id', options_list=['--id'], |
Member
Author
There was a problem hiding this comment.
--upn-or-object-id has been deprecated very long ago (#9297), now we remove it.
evelyn-ys
approved these changes
May 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During the development,
az ad user get-member-groupsuses incorrect API/memberOf:azure-cli/src/azure-cli/azure/cli/command_modules/role/custom.py
Lines 736 to 743 in 595d70d
Instead, the correct API is
/getMemberGroups, like whataz ad group get-member-groupsuses:azure-cli/src/azure-cli/azure/cli/command_modules/role/custom.py
Lines 790 to 795 in d0aadd4
This PR depends on #22318