Skip to content

Commit ecf227b

Browse files
author
Hovsep Mkrtchyan
committed
Fixed Login-AzureRMAccount
1 parent 078fc60 commit ecf227b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Common/Commands.ResourceManager.Profile/LoginAzureRMAccount.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ protected override void ProcessRecord()
103103
{
104104
azureAccount.SetProperty(AzureAccount.Property.Tenants, new[] { Tenant });
105105
}
106-
106+
107+
if( AzureRMCmdlet.DefaultProfile == null)
108+
{
109+
AzureRMCmdlet.DefaultProfile = new AzureRMProfile();
110+
}
111+
107112
var profileClient = new RMProfileClient(AzureRMCmdlet.DefaultProfile);
108113

109114
WriteObject(profileClient.Login(azureAccount, Environment, Tenant, SubscriptionId, password));

0 commit comments

Comments
 (0)