IAM glossary
What is Client Credentials flow?
OAuth flow for machine to machine calls with no user: a service authenticates with its own credentials and gets an access token. No ID token and no refresh token.
How it works
Client Credentials is the OAuth flow for machines: no user, no browser, no consent screen. A backend service calls the token endpoint with grant_type=client_credentials, authenticates with its own credentials (a secret, a signed JWT or a certificate) and asks for scopes.
It receives an access token that represents the service itself. It is the right choice for jobs, integrations and microservices. Because there is no user, there is also no refresh token: when the token expires the service simply asks for a new one.
A simple example
Every night a billing service has to read the orders API. It calls POST /token with grant_type=client_credentials&scope=orders:read and its certificate, gets a token valid for 5 minutes and downloads the day’s orders. Nobody logs in; the orders API knows it is talking to the billing service, with read-only rights.
Common mistakes
- Secrets hard-coded in the repository or shared by many services.
- Asking for broad scopes “just in case”: a stolen token can then do everything.
- Using it inside mobile or browser apps, where the secret becomes public.