Skip to content

[#110120350] Subscriptions and tenants can be listed correctly without specifying -tenantID #1594

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

Merged
merged 9 commits into from
Jan 7, 2016

Conversation

hovsepm
Copy link
Contributor

@hovsepm hovsepm commented Jan 7, 2016

  • [#110120350] Subscriptions and tenants can be listed correctly without specifying -tenantID
  • [#110225916] Do not select subscriptions that are disabled when logging in

if (subscriptions != null && subscriptions.Any())
var subscriptions = (subscriptionClient.Subscriptions.List().Subscriptions ??
new List<Microsoft.Azure.Subscriptions.Models.Subscription>())
.Where(s => s.State.Equals("enabled", StringComparison.OrdinalIgnoreCase) ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be safer to compare constant string to property in case server ever returns a null:
"enabled".Equals(s.State, StringComparison.OrdinalIgnoreCase)

stankovski added a commit that referenced this pull request Jan 7, 2016
[#110120350] Subscriptions and tenants can be listed correctly without specifying -tenantID
@stankovski stankovski merged commit 12bfe67 into Azure:dev Jan 7, 2016
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.

3 participants