VilleFTWV

invalid_scope Error (400) When Using Refresh Token

Hey everyone! We're running into an issue with refresh tokens in our Angular application and could use some help.

Problem:
When the automatic silent refresh is triggered, we're getting a 400 error with:
error: "invalid_scope"

Setup:
We're using the Angular OIDC client with automatic silent refresh:
typescriptthis.oauthService.setupAutomaticSilentRefresh();


Token Request Payload:
grant_type: refresh_token
scope: openid profile email picture offline_access urn:zitadel:iam:org:project urn:zitadel:iam:org:project urn:zitadel:iam:user:metadata urn:zitadel:iam:org:project:roles urn:zitadel:iam:user:resourceowner zitadel:aud urn:zitadel:iam:org:project🆔zitadel:aud 
refresh_token: RweRCsOFMsaucx7ILObPEyGRy62YSjSO1ZSrgeQGHWAtEDXK6nZiqtdjCvGE_jolbTtP0nnyBbhaE5MWt5_U4c7Rxitx3W6OxYX2qyDK
client_id: 324065386xxxx
`

What We've Tried:
✅ Enabled "Refresh Token" in the App settings
✅ Followed the Zitadel Angular example setup
Questions:

Are there specific scopes that shouldn't be included in a refresh token request?
Do we need to configure the allowed scopes differently in the application settings?
Is there a mismatch between the initial auth scopes and refresh scopes?

Any guidance would be greatly appreciated! 🙏
Was this page helpful?