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

[Azure AD] Execute command on non-default tenant #2560

Closed
omerlh opened this issue Mar 20, 2017 · 7 comments
Closed

[Azure AD] Execute command on non-default tenant #2560

omerlh opened this issue Mar 20, 2017 · 7 comments
Labels
Milestone

Comments

@omerlh
Copy link
Contributor

omerlh commented Mar 20, 2017

Hey
I would like to use the ad commands, but with a different tenant. We have multiple tenants in our subscriptions, but it seems that this command only works with the default tenant. Using PowerShell I can do something like Azure-LoginRmAccount -TenantId . I tried to do something similar using az login -t but it failed: No subscriptions found for this account. When I tried to login without tenant it succeeds. Does this flow supported?
Thanks,
Omer

@yugangw-msft
Copy link
Contributor

@omerlh, not supported.
ad commands in CLI was positioned as facility commands for RBAC scenarios which operate on resources under subscriptions.
I will keep this issue open. It is feasible for CLI to incorporate this new context if we have more user voices on this.

@yugangw-msft yugangw-msft added this to the Backlog milestone Mar 20, 2017
@omerlh
Copy link
Contributor Author

omerlh commented Mar 20, 2017

Ok, good to know. Will it help if I create a PR? I might have time for that.

@yugangw-msft
Copy link
Contributor

Contribution is welcome! Could you share your thoughts before you start the work?

@omerlh
Copy link
Contributor Author

omerlh commented Mar 21, 2017

Sure. I hope I will have time to work on that in the future, and then I will share my thoughts...

@JasonRShaver JasonRShaver added the Account az login/account label Apr 14, 2017
@chaliy
Copy link
Contributor

chaliy commented Apr 18, 2017

Hello, I want to double check if the issue is the same. So my scenario is:

  1. I have additional tenant(I can see it and switch to it in Azure Portal)
  2. I want az ad group list to list groups in AD in those tenant. There is no option to specify tenant, so I got nothing.
  3. I tried az login -t newtenantid, however it seems that I still logged into default tenant
  4. az ad group list returns the same results.

I this the same issue? Is there any workaround?

@yugangw-msft
Copy link
Contributor

@chaliy, does your newtenantid has any subscriptions? I mean, if you run az account list, do you see any subscriptions associated with it? If not, which is likely, then there are no good workaround.
I plan to fix this issue in the next few weeks.

@omerlh
Copy link
Contributor Author

omerlh commented Apr 18, 2017

@yugangw-msft I am glad to hear that! looking forward to try it out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants