Skip to content

Commit de77b11

Browse files
author
maddieclayton
authored
Merge pull request #5271 from maddieclayton/Contextbug
Clear ExtendedProperties when SubscriptionId or TenantId are changed using Set-AzureRmContext
2 parents aa187d1 + 8e2ff84 commit de77b11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ResourceManager/Profile/Commands.Profile/Models/RMProfileClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ public IAzureContext SetCurrentContext(string subscriptionNameOrId, string tenan
301301

302302
context.WithTenant(tenant).WithSubscription(subscription);
303303
_profile.TrySetDefaultContext(name, context);
304+
_profile.DefaultContext.ExtendedProperties.Clear();
304305
return context;
305306
}
306307

0 commit comments

Comments
 (0)