Skip to content

Commit 8e2ff84

Browse files
committed
Clear ExtendedProperties when SubscriptionId or TenantId are changed using Set-AzureRmContext
1 parent ec67339 commit 8e2ff84

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)