Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBAC: support AD group commands #2016

Closed
yugangw-msft opened this issue Feb 8, 2017 · 1 comment
Closed

RBAC: support AD group commands #2016

yugangw-msft opened this issue Feb 8, 2017 · 1 comment
Assignees

Comments

@yugangw-msft
Copy link
Contributor

yugangw-msft commented Feb 8, 2017

  1. Author commands under az ad group, to be in parity with xplat's
  2. On group list, add --display-name filtering
  3. support group name when resolve `--assignee' on role creation
@ashb
Copy link

ashb commented Mar 15, 2017

On point 1) above all the code to speak to the graph API is already there. I hacked in the following 4 lines into azure/cli/command_modules/role/commands.py:

cli_command(__name__, 'ad group create', 'azure.graphrbac.operations.groups_operations#GroupsOperations.create', factory)
cli_command(__name__, 'ad group list-members', 'azure.graphrbac.operations.groups_operations#GroupsOperations.get_group_members', factory)
cli_command(__name__, 'ad group add-member', 'azure.graphrbac.operations.groups_operations#GroupsOperations.add_member', factory)
cli_command(__name__, 'ad group remove-member', 'azure.graphrbac.operations.groups_operations#GroupsOperations.remove_member', factory)

And the commands worked, but the interface wasn't the cleanest so it will need a tiny bit of custom wrapping to make the params consistent.

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

No branches or pull requests

2 participants