When trying to connect from Azure Storage Explorer (v1.33.0) or SQL Server Management Studio (v20.0), I am unable use Azure authentication. I get redirected to Edge to select my Azure account at
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize
and then am redirected to a
http://localhost:65389/?code=xxxxx
page which fails.
It looks like the initiating application was supposed to listen on http://localhost:65389 but was not able to start the listening process. Note that the port number is random and changes on each request.
The application returns the following error message:
Unable to sign in: An HttpListenerException occurred while listening on http://localhost:65389/ for the system browser to complete the login.
Possible cause and mitigation:
The app is unable to listen on the specified URL; run 'netsh http add iplisten 127.0.0.1' from the Admin command prompt.
This has been a long-standing issue which has been a problem for over 1 year across lots of versions of these applications. I have tried adding the following, but nothing has worked.
netsh http add iplisten 127.0.0.1
netsh http add iplisten 0.0.0.0
netsh http add iplisten ipaddress=::