Cannot authenticate using SSO/Identity Center: "missing required scope: sso:account:access"
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
AWS Toolkit for VSCode fails to use AWS Identity Center SSO
### Log
```
2025-03-08 11:31:59.102 [info] auth: Updating connection state of profile:awsicsso to authenticating
2025-03-08 11:31:59.102 [info] auth: Handling validation error of connection: profile:awsicsso
2025-03-08 11:31:59.102 [info] auth: Updating connection state of profile:awsicsso to invalid
2025-03-08 11:31:59.103 [error] _aws.toolkit.auth.reauthenticate: Error: Unable to authenticate connection
-> Error: Session for "awsicsso" is missing required scope: sso:account:access
```
### Configuration
~/.aws/config (redacted)
```
[sso-session sso]
sso_region = us-east-2
sso_start_url = https://d-123example.awsapps.com/start
sso_registration_scope = sso:account:access
[profile awsicsso]
sso_session = sso
sso_account_id = 123456789012
sso_role_name = DeveloperAccess
region = ca-central-1
output = json
```
## Steps to reproduce the issue
## Expected behavior
Credential is accepted and plugin works
## System details (run `AWS: About` and/or `Amazon Q: About`)
- OS: Darwin x64 24.3.0
- Visual Studio Code version: 1.97.0
- AWS Toolkit version: 3.46.0
- Amazon Q version: N/A
Contributor guide
Research direction
No source file or test is identified in the report. First reproduce with the shown AWS configuration and `aws sts get-caller-identity --profile awsicsso`, then select the profile through the AWS Toolkit connection picker in VSCode and inspect the Output error. Done means the `awsicsso` credential is accepted and the plugin works without the missing-scope error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- authentication, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100