microsoft / microsoft/vscode-azureresourcegroups
Error selecting subscriptions with a student account
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 78
- Forks
- 55
- Avg merge
- 16h 49m
- Merged PRs (30d)
- 139
Description
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.
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in auth/src/VSCodeAzureSubscriptionProvider.ts around line 237, where the reported error is thrown, and review the Microsoft auth provider logs showing the tenant-scoped token refresh failure. Reproduce subscription selection with a student account and trace how the MFA-related invalid_grant result is handled. Done means student accounts can select subscriptions without the misleading sign-in error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100