Connect-AZAccount question

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
User avatar
swindmiller
Posts: 54
Joined: Tue Apr 12, 2016 4:42 pm

Connect-AZAccount question

Post by swindmiller »

I have read through all the "connect-AZaccount" posts (here and on Github). Just trying to understand the bottom line, this still does not work until there is an update right?

Will it work if I use a Service Principal and include the creds for that on the command to launch Connect-AzAccount?

My current experience is when trying to launch Connect-AZaccount from a gui, everything just hangs. I never get any popups. I see some saying they dont get the MFA popup but I do not even get the login window.

I do have the AZ modules loaded in Powershell Studio.

I am fine if it just will not work at this time, just wanted to verify that :)

Scott

jvierra
Posts: 14672
Joined: Tue May 22, 2007 9:57 am
Answers: 6
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: Connect-AZAccount question

Post by jvierra »

I recommend posting your issue on GitHub. The module has issues when run in a GUI application and the people there will be better able to tell you if there is a fix at this time.

You will also want to be sure you have the latest updates to WinForms, Net Framework and the Azure modules. You will not want to use this with PS7 or Net Core.

User avatar
swindmiller
Posts: 54
Joined: Tue Apr 12, 2016 4:42 pm

Re: Connect-AZAccount question

Post by swindmiller »

Thanks for the reply and will do! I knew it wasnt a PS Studio problem, just looking for a little insight as I didnt know exactly what the result was right now.

Thanks for the help!

Scott

jvierra
Posts: 14672
Joined: Tue May 22, 2007 9:57 am
Answers: 6
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: Connect-AZAccount question

Post by jvierra »

One way that has worked is to connect before launching the GUI. Call the GUI PS1 from another script that has already connected. There will still be Azure calls that may hang and the threading model does create conflicts. The Azure guys will have the best approaches to solving these issues as it is very much dependent on what you need to accomplish.

User avatar
swindmiller
Posts: 54
Joined: Tue Apr 12, 2016 4:42 pm

Re: Connect-AZAccount question

Post by swindmiller »

Excellent, thanks!

Post Reply