.NET › Authentication & Authorization (Identity, JWT, OAuth)
What is the OAuth 2.0 Client Credentials flow, and when is it used instead of the Authorization Code flow?
IntermediateAnswer
The Client Credentials flow authenticates the application itself (not an end user) using its own client ID and secret to obtain an access token, used for machine-to-machine communication like a backend service calling another API with no human user involved -- unlike Authorization Code flow, which represents delegated user authorization.
POST https://auth.example.com/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=service-a&client_secret=***&scope=api.readReal-world example A nightly batch job service authenticates to a partner's API using Client Credentials flow since it runs unattended with no user present to authorize anything, obtaining a service-level token scoped to just the permissions the job needs.