Page 1 of 1

Connect-AZAccount question

Posted: Wed Dec 16, 2020 8:13 am
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

Re: Connect-AZAccount question

Posted: Wed Dec 16, 2020 9:34 am
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.

Re: Connect-AZAccount question

Posted: Wed Dec 16, 2020 9:46 am
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

Re: Connect-AZAccount question

Posted: Wed Dec 16, 2020 9:55 am
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.

Re: Connect-AZAccount question

Posted: Wed Dec 16, 2020 9:57 am
by swindmiller
Excellent, thanks!