microsoft / vscode-azureresourcegroups

VS Code extension for managing Azure resources.
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups
MIT License
52 stars 28 forks source link

Error selecting subscriptions with a student account #740

Open alexweininger opened 1 year ago

alexweininger commented 1 year ago

When I sign in using a student account, I'm met with a "You are not signed in to an Azure account. Please sign in." error when I try to select subscriptions.

https://github.com/microsoft/vscode-azureresourcegroups/assets/12476526/c1402ac8-0144-48a7-8145-a3ec28ccd64c

Error is thrown here.

Microsoft auth provider logs:

2023-08-17 13:40:01.437 [info] Getting sessions for the following scopes: email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:01.437 [info] Got 1 sessions for scopes: email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:01.437 [info] Token available from cache (for scopes email https://management.azure.com/.default offline_access openid profile), expires in 3482904 milliseconds

2023-08-17 13:40:01.446 [info] Getting sessions for the following scopes: email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:01.446 [info] Got 1 sessions for scopes: email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:01.446 [info] Token available from cache (for scopes email https://management.azure.com/.default offline_access openid profile), expires in 3482895 milliseconds

2023-08-17 13:40:01.628 [info] Getting sessions for the following scopes: VSCODE_TENANT:<tenant id> email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:01.628 [info] Refreshing token for scopes: VSCODE_TENANT:<tenant id> email https://management.azure.com/.default offline_access openid profile

2023-08-17 13:40:02.498 [error] Refreshing token failed (for scopes: VSCODE_TENANT:<tenant id> email https://management.azure.com/.default offline_access openid profile): {"error":"invalid_grant","error_description":"AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access 'uuid'.\r\nTrace ID: uuid\r\nCorrelation ID: uuid\r\nTimestamp: 2023-08-17 20:40:02Z","error_codes":[50076],"timestamp":"2023-08-17 20:40:02Z","trace_id":"uuid","correlation_id":"uuid","error_uri":"https://login.microsoftonline.com/error?code=50076","suberror":"basic_action"}

2023-08-17 13:40:02.499 [error] Attempted to get a new session for scopes 'VSCODE_TENANT:<tenant id> email https://management.azure.com/.default offline_access openid profile' using the existing session with scopes 'email https://management.azure.com/.default offline_access openid profile' but it failed due to: {"error":"invalid_grant","error_description":"AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '797f4846-ba00-4fd7-ba43-dac1f8f63013'.\r\nTrace ID: uuid\r\nCorrelation ID: uuid\r\nTimestamp: 2023-08-17 20:40:02Z","error_codes":[50076],"timestamp":"2023-08-17 20:40:02Z","trace_id":"uuid","correlation_id":"uuid","error_uri":"https://login.microsoftonline.com/error?code=50076","suberror":"basic_action"}

2023-08-17 13:40:02.499 [info] Got 0 sessions for scopes: VSCODE_TENANT:<tenant id> email https://management.azure.com/.default offline_access openid profile
alexweininger commented 1 year ago

Seems similar to https://github.com/microsoft/vscode-azure-account/issues/797 which was fixed in VS Code. However it seems broken again.