OAuth scopes: limit requested permissions to the work required
Learn what OAuth scope represents, why requested scope is not a grant, and how clients and APIs should enforce the effective permissions.
OAuth scopes: limit requested permissions to the work required
An OAuth scope is a provider-defined string that describes a kind of access a client requests and that the authorization server and API interpret. For example, photos:read might allow viewing photos and photos:write might allow changing them. OAuth does not define a universal catalog or the exact meaning of each scope name.
A request is not a grant
A client can send the scope parameter to an authorization or token endpoint. The authorization server may allow all, some, or none of the requested scopes according to user consent, client registration, and policy. The client’s request is not permission by itself. RFC 6749 defines scope values as case-sensitive, space-delimited strings; the order of multiple values does not matter. Names such as read or photos:read are examples, not a standard naming rule.
If the issued scope differs from the requested scope, RFC 6749 requires the authorization server to include the effective scope in the response. If the request omits scope, the server applies a documented default or returns invalid_scope. Check the actual result instead of assuming the full request was granted.
Follow the permission through the flow
Suppose a calendar app lists events and creates new ones. It requests only calendar:read and calendar:event:create. The user may approve reading but not creation, or an organization policy may block creation. The API must compare the token’s effective permissions with the requested action, rather than checking which words the original request contained.
Request the minimum scopes needed for the feature. Do not add broad account-management access without a need.
Let the authorization server apply registration, user-consent, and organization policy. It may reject the request or grant a narrower set.
Check the effective scope returned by the server. If it differs, disable features that need missing permissions.
At the API, require the appropriate permission for each operation and separately enforce object ownership, tenant boundaries, and other policy.
POST /token HTTP/1.1
Host: auth.example
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code=<authorization_code>
&scope=calendar%3Aread%20calendar%3Aevent%3AcreateThe example is hypothetical and shows form syntax only. Use the provider’s documentation for actual scope names and combinations. Including scope in a request does not guarantee the server will grant it.
Scope, audience, and other authorization checks
Scope usually describes which operations are allowed within a resource; audience describes which API should accept the token. A calendar:read scope does not mean a payments API should accept the token. Conversely, a matching audience does not grant permission to modify calendar events. A system using multiple APIs may need both a specific resource and minimal scopes.
Scope is not necessarily the same as a role or a JWT claim. A provider may encode scopes in a token or map them to server-side policy. Validate tokens using the provider’s contract: opaque tokens may need introspection; JWT access tokens require appropriate signature, issuer, expiry, audience, and authorization checks. Do not trust a JWT merely because it can be decoded.
When granted scope is narrower
If the response lacks a scope needed by a feature, do not assume the feature is allowed. Check whether incremental consent is supported, whether the provider accepts the requested scope name and combination, and whether app registration or existing consent limits it. Explain that the feature is unavailable, and request additional consent only when supported and appropriate. Do not repeatedly request broader permissions or weaken API checks to work around an error.
Summary
Scope describes requested and granted kinds of access, but scope names and exact semantics are provider-defined. Request the minimum, inspect the effective grant, and enforce the required permission at each API operation alongside resource-level policy.
References
[RFC 6749 §3.3 — Access Token Scope](https://www.rfc-editor.org/rfc/rfc6749.html#section-3.3)
[RFC 8707 — Resource Indicators for OAuth 2.0](https://www.rfc-editor.org/rfc/rfc8707.html)
[RFC 9700 §2.3 — Access Token Privilege Restriction](https://www.rfc-editor.org/rfc/rfc9700.html#section-2.3)