Unable to run Add-AzureAccount

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
vgilbertsson
Posts: 3
Joined: Wed Aug 05, 2015 3:36 am

Unable to run Add-AzureAccount

Post by vgilbertsson » Wed Nov 25, 2015 2:56 am

Product, version and build:
64 bit version of product: Powershell Studio
Operating system:
64 bit OS:
Powershell version
v4 64bit and v5 64bit

Hi,

I am unable to run Add-AzureAccount in the powershell consol inside powershell studio. Before this was not a problem because i could logon outside powershell studio and restart the shell to obtain the "logon session". With the new Azure cmdlets i must logon in every shell i open. Because i can't runt add-AzureAccount or logon-azurermaccount i can't logon. The cmdlet will run but there is no "popup" for me to type my credentials.

Best regards.

User avatar
davidc
Posts: 4978
Joined: Thu Aug 18, 2011 4:56 am

Re: Unable to run Add-AzureAccount

Post by davidc » Mon Nov 30, 2015 9:44 am

The embedded console is just an instance of powershell.exe. I'm not sure what popup you are referring to. You usually don't get a popup for credentials in the console; instead it should prompt within the shell itself.

David
David
SAPIEN Technologies, Inc.

User avatar
vgilbertsson
Posts: 3
Joined: Wed Aug 05, 2015 3:36 am

Re: Unable to run Add-AzureAccount

Post by vgilbertsson » Tue Dec 01, 2015 12:40 am

Yes i guess that is correct. Normally i would use get-credentials or something like that. But unfortunately the Azure login does not work like that. When you login to Azure Powershell there is a popup.

I cant post any URL because I don't have enough posts. Please search for "azure powershell login" on google pictures and you will see the popup.

Also made my college install the Azure powershell module and he got the same problem in powershell studio.

In the regular console there is no problem.

User avatar
davidc
Posts: 4978
Joined: Thu Aug 18, 2011 4:56 am

Re: Unable to run Add-AzureAccount

Post by davidc » Tue Dec 01, 2015 9:45 am

We will take a look at it and try to determine what the issue is.

In the meantime, make sure the popup isn't hidden by the current window. I had experiences where a popup would appear behind some other window and had to minimize the windows in front to see it.

David
David
SAPIEN Technologies, Inc.

User avatar
juneblender
Posts: 93
Joined: Thu Jul 24, 2014 3:26 pm

Re: Unable to run Add-AzureAccount

Post by juneblender » Tue Dec 01, 2015 6:08 pm

I just confirmed this issue on PowerShell 5.0.10586.0 with PowerShell Studio 4.2.98.

Unfortunately, this is an effect of the type of authentication window that Microsoft Azure displays. Instead of a typical pop-up window, like the window that appears when you use the Show-Command cmdlet or the ShowWindow parameter of the Get-Help cmdlet, the Azure sign-in window is created as a child window that PowerShell Studio cannot display.

I've reported this bug to the Azure AD team and I'll follow up on it.

As a workaround, you might be able to use the same technique that you would use when you want to suppress that prompt and run without interaction. I describe this method in this post: Saving Passwords for Add-AzureAccount.

Hope this works for you. Thanks again for reporting it.

User avatar
vgilbertsson
Posts: 3
Joined: Wed Aug 05, 2015 3:36 am

Re: Unable to run Add-AzureAccount

Post by vgilbertsson » Thu Dec 03, 2015 5:50 am

Thanks! Please leave a reply here when you hear any news.

I'm using a liveID when i login. Because of this i must first type something@outlook(dot)com, and then i will be redirected to the liveID login page. After this i can type my real email and password.

Maybe i should change to a Azure AD account... Then I should be able to use -credential to suppress the popup.

In the mean while I write in Powershell Studio and execute from Powershell IDE.