Ran into a strange issue today, while trying to login through AZ CLI commands on powershell to my Azure account.
PS C:\Users\Parag> az login
Port '8400' is taken with error '[WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted'. Trying with the next one
Terminate batch job (Y/N)? y
PS C:\Users\Parag>
while chrome would happy show the login window, and after entering my credential , the final page/redirection page would fail. it would redirect to
This site can’t provide a secure connection.
After trying it a lot from closing powershell and relaunching, and running it even from Admin mode it did not solve the issue.
So after googling a bit found this answer:
PS C:\Users\paagra> az login --use-device-code
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XYZHDAM34 to authenticate.
and then on browsing https://microsoft.com/devicelogin and entering the code presented the azure login was successful and i was able to continue
PS C:\Users\Parag> az login
Port '8400' is taken with error '[WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted'. Trying with the next one
Terminate batch job (Y/N)? y
PS C:\Users\Parag>
while chrome would happy show the login window, and after entering my credential , the final page/redirection page would fail. it would redirect to
https://localhost:8400/?code=<SomeCODE>&state=<SomeCode>&session_state=<SomeCode>
This site can’t provide a secure connection.
After trying it a lot from closing powershell and relaunching, and running it even from Admin mode it did not solve the issue.
So after googling a bit found this answer:
PS C:\Users\paagra> az login --use-device-code
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XYZHDAM34 to authenticate.
and then on browsing https://microsoft.com/devicelogin and entering the code presented the azure login was successful and i was able to continue