Skip to content

Commit

Permalink
suggest user to select default subscription using azconfig cmdlet (#1…
Browse files Browse the repository at this point in the history
…8610)

* upadte message when >1 sub

* Update src/Accounts/Accounts/Models/RMProfileClient.cs

Co-authored-by: Mike F. Robbins <mike.robbins@microsoft.com>

Co-authored-by: Mike F. Robbins <mike.robbins@microsoft.com>
  • Loading branch information
isra-fel and mikefrobbins committed Jun 27, 2022
1 parent 5c90551 commit e410d0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Accounts/Accounts/Models/RMProfileClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,9 @@ private bool TryGetTenantSubscription(IAccessToken accessToken,
{
WriteWarningMessage(string.Format(
"TenantId '{0}' contains more than one active subscription. First one will be selected for further use. " +
"To select another subscription, use Set-AzContext.",
"To select another subscription, use Set-AzContext. " +
"To override which subscription Connect-AzAccount selects by default, " +
"use `Update-AzConfig -DefaultSubscriptionForLogin <SubscriptionNameOrId>`.",
accessToken.TenantId));
}
subscription = subscription ?? subscriptions.First();
Expand Down

0 comments on commit e410d0e

Please sign in to comment.