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

Extend/remove the limit of 25 context after login #9865

Closed
shaqian opened this issue Aug 20, 2019 · 5 comments · Fixed by #12397
Closed

Extend/remove the limit of 25 context after login #9865

shaqian opened this issue Aug 20, 2019 · 5 comments · Fixed by #12397
Assignees
Labels
Azure PS Team customer-reported feature-request This issue requires a new behavior in the product in order be resolved.

Comments

@shaqian
Copy link

shaqian commented Aug 20, 2019

Description of the new feature

By default Azure PowerShell populates context for only 25 subscriptions after login.
https://github.com/Azure/azure-powershell/blob/master/src/Accounts/Accounts/Models/RMProfileClient.cs#L293

var subscriptions = ListSubscriptions(tenantId).Take(25);

The limit is hard-coded. Users have to manually run additional commands to add more subscriptions.

It'd be great to have a more flexible way for user to choose how many subscriptions to populate context for.

Proposed implementation details (optional)

Add an option for how many context to populate by default.

@shaqian shaqian added Azure PS Team feature-request This issue requires a new behavior in the product in order be resolved. labels Aug 20, 2019
@cormacpayne
Copy link
Member

@shaqian thanks for the suggestion -- is there a preference on how this should be implemented? I think there are two ways to go about this:

(1) Connect-AzAccount -PopulateAllContexts

(2) Connect-AzAccount -MaxContextsToPopulate <int>

Do you think it would be better to (1) create a context for every subscription that the user has access to, or (2) allow the user to provide how many contexts they want?

@shaqian
Copy link
Author

shaqian commented Aug 28, 2019

Hi @cormacpayne I think 1) is better. :)

@dingmeng-xue
Copy link
Member

dingmeng-xue commented Feb 14, 2020

Can we merge 2 parameters together. If MaxContextsToPopulate < 0, it means to load all subscriptions? @dcaro @markcowl ?

@dingmeng-xue
Copy link
Member

dingmeng-xue commented Jul 9, 2020

@BethanyZhou , given we have no environment to accurately evaluate performance impact in large tenant, let's focus on option 2 for the time being.

recommended parameter name is -MaxContextPopulation

@BethanyZhou
Copy link
Contributor

BethanyZhou commented Jul 20, 2020

PR merged #12397

@BethanyZhou BethanyZhou linked a pull request Jul 20, 2020 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure PS Team customer-reported feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants