question

cosmon avatar image
0 Votes"
cosmon asked DmitryGryaznukhin-0132 commented

Connect to Azure using Powershell on MacOS

Hello, When I try to connecto to Azure by: connect-azaccount After the browser opens and I enter the code, I receive: Connect-AzAccount: Exception has been thrown by the target of an invocation Powershell version 7.1.3 AZ Moudule version 5.6.0 macOS Mojave 10.14.6 I remember this used to work in the past... Thank for your help

azure-cloud-services
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@cosmon Apologies on the delay.This can occur if the latest Powershell version or Az module version is not installed. But as you have shared, you have the latest versions installed. In this case, I would recommend trying this on Azure Cloudshell and share if that works. That would help rule out whether it is related to Powershell.

You can access the Cloud Shell either by using Direct link: Open a browser to https://shell.azure.com or via Azure portal: Select the Cloud Shell icon on the Azure portal.

85022-image.png

Install PowerShell on MacOS

Please check these ongoing issues and resolutions provided:
https://github.com/Azure/azure-powershell/issues/14478
https://github.com/Azure/azure-powershell/issues/13714

Please try this and let me know. Thanks.


0 Votes 0 ·
image.png (11.8 KiB)
cosmon avatar image cosmon karishmatiwari-msft ·

Hello!

Thank you for the reply.

It works with CloudShell. I already knew that but I did not mention it. It is just that I can't get it to work on a Mac...

0 Votes 0 ·

Can you please try uninstalling and then installation of Powershell on Mac and let me know.: Install PowerShell on MacOS


0 Votes 0 ·

1 Answer

cosmon avatar image
0 Votes"
cosmon answered DmitryGryaznukhin-0132 commented

Am I the only person with this issue? :)

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Did you fix it? Facing the same issue.

0 Votes 0 ·

Just wait up to 15 minutes - you'll be redirected to browser )

0 Votes 0 ·