Unable to run Add-AzureAccount

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
vgilbertsson
Posts: 3
Last visit: Wed Sep 21, 2016 4:05 am

Unable to run Add-AzureAccount

Post by vgilbertsson »

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: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Unable to run Add-AzureAccount

Post by davidc »

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
Last visit: Wed Sep 21, 2016 4:05 am

Re: Unable to run Add-AzureAccount

Post by vgilbertsson »

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: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Unable to run Add-AzureAccount

Post by davidc »

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
Last visit: Thu Mar 30, 2017 8:54 am

Re: Unable to run Add-AzureAccount

Post by juneblender »

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
Last visit: Wed Sep 21, 2016 4:05 am

Re: Unable to run Add-AzureAccount

Post by vgilbertsson »

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.
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.