static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

SWA CLI cannot login with a Microsoft account

Open TechWatching opened this issue 2 years ago • 7 comments

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:

  1. Go to 'the terminal
  2. Type in command 'swa login'
  3. Enter credentials of a Microsoft account and click sign in
  4. 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

TechWatching avatar Jan 23 '23 22:01 TechWatching

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.

sgollapudi77 avatar Jan 24 '23 08:01 sgollapudi77

Still the same issue:

image

I am using a live.com account

TechWatching avatar Jan 24 '23 09:01 TechWatching

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.

sgollapudi77 avatar Feb 01 '23 08:02 sgollapudi77

Same issue. Should I upgrade the swa CLI to something?

TechWatching avatar Feb 01 '23 10:02 TechWatching

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:

image

image

DeadDuck avatar Jan 30 '24 10:01 DeadDuck

I used the deployment token for the deployment, bypassing interactive login, and it works for me.

DeadDuck avatar Jan 30 '24 11:01 DeadDuck

Would be great if swa login would support az cli auth, or device token auth.

cveld avatar Feb 10 '24 14:02 cveld