IAM glossary
What is Scope?
What an app asks to do with an access token, such as read:invoices or openid profile. Ask for the minimum: a token with broad scopes is a broad key.
How it works
A scope is a label that limits what an access token allows, such as calendar.read, orders:write or openid email. The client asks for scopes, the user (or an admin) consents, and the authorization server puts the granted scopes in the token.
The API then checks the scope on every call: a token with calendar.read can list events but not create them. Scopes are coarse: they say what kind of action is allowed, not on which specific records. The API must still check ownership.
A simple example
A meeting scheduler asks Google for calendar.events.readonly. It can see when you are busy to propose slots, but if a bug made it try to delete an event, Google’s API would answer 403 because the token does not have a write scope.
Common mistakes
- Asking for every scope up front instead of only what the feature needs.
- APIs that do not check scopes at all once the token is valid.
- Treating scopes as fine-grained permissions on single records.