SWA CLI cannot login with a Microsoft account
Before filing this issue, please ensure you're using the latest CLI by running swa --version and comparing to the latest version on npm.
1.0.6
Are you accessing the CLI from the default port :4280 ?
- [ ] No, I am using a different port number (
--port) and accessing the CLI from that port - [ X] Yes, I am accessing the CLI from port
:4280
Make sure you are accessing the URL printed in the console when running
swa start!
ℹ️ NOTE: Make sure to enable debug logs when running any swa commands using --verbose=silly
Describe the bug
When doing an swa login and connect using my Microsoft account login, the login fails with the following message: ERROR. Scopes: https://management.azure.com//.default. Error message: null. null.
To Reproduce Steps to reproduce the behavior:
- Go to 'the terminal
- Type in command 'swa login'
- Enter credentials of a Microsoft account and click sign in
- See error
Expected behavior The SWA CLI should be able to login to Azure using a Microsoft account.
Desktop (please complete the following information):
- OS: Windows 11
- Version 10/0/22000
Hey @TechWatching, can you try it now and get back to us. We faced this error sometime back but now it is working fine. Thanks.
Still the same issue:

I am using a live.com account
Hey @TechWatching this issue has been resolved on the azure-identity team, can you check once and see if it still persists? We tried using the microsoft.com account and are able to deploy the SWA using swa-cli.
Same issue. Should I upgrade the swa CLI to something?
Any progress? Does it normally work?
We are having the same issue with v1.1.6 in Windows 11, making it useless for us.
When tried to login or deploy, the browser instantly displays:
ERROR. Scopes: https://management.azure.com//.default. Error message: null. null.
And in the CLI we instantly get the error as below:
I used the deployment token for the deployment, bypassing interactive login, and it works for me.
Would be great if swa login would support az cli auth, or device token auth.