1001Ferramentas
🔑Validators

OAuth Scope Checker

Check whether a requested scope is present in the space separated list a token came back with, matched literally as OAuth 2.0 requires.

Resultado

Why a nearly matching scope still fails

The endpoint returns 403 with insufficient_scope and you end up eyeballing two lists of strings: the one that came back in the token and the one the docs demand. It is easy to read read:users and read:user as the same thing, or to assume profile already covers email. With seven or eight granted scopes on a single line, comparing them by sight is asking for trouble.

The rule OAuth 2.0 uses is blunt: scope is a space separated list and each entry is matched literally. There is no built in hierarchy, no wildcard, no inheritance. read:users does not grant read:users:email, and admin opens nothing on its own. If your authorization server treats one scope as covering another, that is its own convention rather than part of the spec. Case matters too.

In practice, use the exact list from the scope field of the token response, not the one you asked for at authorization time, since a user can decline part of the consent and the two then differ. Anything missing needs a fresh consent round. If the scopes line up and the API still says no, check audience, tenant and expiry before touching scopes again. The comparison happens in the browser, with nothing sent out.

Frequently asked questions

Are OAuth scopes case sensitive?
Yes. Matching is literal, character by character, so read:Users and read:users are two different scopes as far as the authorization server is concerned.
Why did the token come back with fewer scopes than I requested?
The authorization server may grant a subset of what was asked, either by policy or because the user declined part of the consent. The scope field in the response is the one that counts.
Is there a wildcard like read:* in OAuth?
Not in the specification. Some providers ship their own grouping conventions, but those are vendor extensions and should be spelled out in the provider docs.

Related Tools