> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc/oauth-and-oidc-reference.md). Agents can also search and read this documentation through its [MCP server](https://docs.openiam.com/~gitbook/mcp).

# OAuth endpoints, grants, scopes and signing

Every OAuth and OIDC endpoint including the end-session endpoint, what the tenant and per-client discovery documents advertise, Client ID Metadata Documents, the resource parameter, the three response

**Applies to:** OpenIAM 2026.11.2

## What this covers

The value catalogs behind [OAuth 2.0 and OpenID Connect](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc.md): the endpoints OpenIAM exposes, what the **Authorization Grant Flow** drop-down offers and how those values relate to the `grant_type` a client puts on the wire, how the client presents its secret, what each signing algorithm publishes at the JWKS endpoint, and the scopes that ship. Scan it while you fill the client form.

## Every endpoint

All OAuth and OIDC paths are built from `org.openiam.oauth.path`, which is `${org.openiam.idp.context.path}/oauth2`, and `org.openiam.idp.context.path` defaults to `/idp`, so the concrete base is `/idp/oauth2`. Neither key has a row on **Administration → System Configuration** — both come from the deployment's own configuration, so a base other than `/idp/oauth2` is something only the deployment owner can confirm. The observable check is a discovery document: the URLs it publishes are built from the running values.

These are the values you hand the application team. Nothing here is a call you make to administer OpenIAM — the client itself is configured on **Access Control → Authentication Providers**.

| Endpoint                         | Concrete URL                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Authorization                    | `https://<OPENIAM_HOST>/idp/oauth2/authorize`                                                                                                                                                                                                                                                                                                                                                                                                                |
| Authorization (public app key)   | `https://<OPENIAM_HOST>/idp/oauth2/authorize/{application_key}`                                                                                                                                                                                                                                                                                                                                                                                              |
| Token                            | `https://<OPENIAM_HOST>/idp/oauth2/token`                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Token introspection (RFC 7662)   | `https://<OPENIAM_HOST>/idp/oauth2/introspect` — published as `introspection_endpoint` (2026.11.2 and later); see [Token introspection](#token-introspection)                                                                                                                                                                                                                                                                                                |
| Token information, deprecated    | `https://<OPENIAM_HOST>/idp/oauth2/token/info` — answers anonymous callers unless `org.openiam.oauth.token.info.public` is `false` (2026.10.1 and later). Deprecated from 2026.11.2 in favor of `/idp/oauth2/introspect`; see [The deprecated token-information endpoint](#the-deprecated-token-information-endpoint)                                                                                                                                        |
| Token validation                 | `https://<OPENIAM_HOST>/idp/oauth2/token/validate`                                                                                                                                                                                                                                                                                                                                                                                                           |
| Token refresh, legacy            | `https://<OPENIAM_HOST>/idp/oauth2/token/refresh` — authenticates no client; answers only while `org.openiam.oauth.token.refresh.legacy.enabled` is `true` (2026.10.2 and later). Refresh through `POST /idp/oauth2/token` with `grant_type=refresh_token` instead                                                                                                                                                                                           |
| Revocation (RFC 7009)            | `https://<OPENIAM_HOST>/idp/oauth2/token/revoke`                                                                                                                                                                                                                                                                                                                                                                                                             |
| End session (OIDC sign-out)      | `https://<OPENIAM_HOST>/idp/oauth2/logout` — published as `end_session_endpoint` (2026.11.1 and later); see [Sign-out: the end-session endpoint](#sign-out-the-end-session-endpoint)                                                                                                                                                                                                                                                                         |
| Revocation / OIDC logout, older  | `https://<OPENIAM_HOST>/idp/oauth2/revoke` — use the end-session endpoint for sign-out; see [The older sign-out through the revoke endpoint](#the-older-sign-out-through-the-revoke-endpoint)                                                                                                                                                                                                                                                                |
| UserInfo                         | `https://<OPENIAM_HOST>/idp/oauth2/userinfo`                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Implicit handler                 | `https://<OPENIAM_HOST>/idp/oauth2/handler`                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Discovery document, per client   | `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>/.well-known/openid-configuration`                                                                                                                                                                                                                                                                                                                                                                            |
| Metadata document, tenant        | `https://<OPENIAM_HOST>/idp/oauth2/.well-known/openid-configuration` and `https://<OPENIAM_HOST>/idp/oauth2/.well-known/oauth-authorization-server` — one document, independent of any client (2026.10.2 and later); see [The tenant metadata document](#the-tenant-metadata-document). A reverse proxy can also serve it at `https://<OPENIAM_HOST>/.well-known/oauth-authorization-server/idp/oauth2`; see [The RFC 8414 location](#the-rfc-8414-location) |
| JWKS, tenant                     | `https://<OPENIAM_HOST>/idp/oauth2/.well-known/jwks` — an empty key set by design, because signing keys belong to individual clients (2026.10.2 and later)                                                                                                                                                                                                                                                                                                   |
| JWKS                             | `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>/.well-known/jwks`                                                                                                                                                                                                                                                                                                                                                                                            |
| JWKS, deprecated per-client form | `https://<OPENIAM_HOST>/idp/oauth2/.well-known/jwks/<CLIENT_ID>` — deprecated, kept for back compatibility                                                                                                                                                                                                                                                                                                                                                   |

The discovery document is the cheapest one to open in a browser, because it will not answer at all until the client row is live in the cache. From 2026.11.2 a per-client discovery document or key set requested under a **JWT Issuer** that no client carries answers `404` with a JSON body, `{"error":"not_found", "error_description":"No OAuth client is registered under this issuer"}`, and the deprecated `/.well-known/jwks/<CLIENT_ID>` form answers the same for an unknown client ID. Earlier releases failed with `No OAuth Provider with Issuer: <x>`.

`<JWT_ISSUER>` is the value of the client's **JWT Issuer** attribute (`JwtIssue`), not the client ID. The issuer claim OpenIAM publishes is `https://<OPENIAM_HOST>` + `org.openiam.idp.openid.issuer.base.path` + the **JWT Issuer** value, and `org.openiam.idp.openid.issuer.base.path` is `${org.openiam.idp.context.path}/oauth2/`, so the issuer is `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>`.

`<OPENIAM_HOST>` is the host name the request arrived on, unless `org.openiam.oauth.issuer` is set. From 2026.11.2 that property fixes the scheme and host of every issuer, the tenant's and each client's, and of every endpoint both discovery documents publish. The per-client discovery document, the ID token's `iss` claim, the `id_token_hint` check at sign-out and the issuer a signed client assertion must name all use the same value, so a client sees one issuer whichever host name it reached OpenIAM on.

{% hint style="warning" %}
**Behavior change in 2026.11.2: the client issuer follows `org.openiam.oauth.issuer`.** Before 2026.11.2 that property set only the tenant issuer, and a client's issuer always used the host name of the request. If the property is set to a host name other than the one a relying party used when it registered OpenIAM, the issuer in that client's discovery document and ID tokens changes on upgrade. Refresh the relying party's trust after the upgrade, or register the new issuer with it. A deployment that leaves the property empty is not affected.
{% endhint %}

{% hint style="info" %}
**The `jwks_uri` in the discovery document is correct from 2026.10.1.** Releases before 2026.10.1 prefixed the raw **JWT Issuer** name onto the already-absolute URL, so the published value looked like `<JWT_ISSUER>https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>/.well-known/jwks` and a relying party that followed it blindly failed. If you run an earlier release, give the application team `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>/.well-known/jwks` explicitly. On 2026.10.1 and later the document can be used as-is: open it in a browser and confirm `jwks_uri` starts with `https://`.
{% endhint %}

## The tenant metadata document

From 2026.10.2 the IdP also publishes one authorization-server metadata document (RFC 8414) for the tenant as a whole, at both paths a client derives from an issuer that carries a path:

{% code overflow="wrap" %}

```
https://<OPENIAM_HOST>/idp/oauth2/.well-known/openid-configuration
https://<OPENIAM_HOST>/idp/oauth2/.well-known/oauth-authorization-server
```

{% endcode %}

It exists so a client that has never been registered, such as a Model Context Protocol (MCP) client that identifies itself by a [Client ID Metadata Document](#client-id-metadata-documents), can discover the endpoints and the server's capabilities before its first authorization request. It names no client and does not wait for the client sweep, so it answers as soon as the IdP is up.

| Member                                                                                                                                   | Value                                                                                                                                                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `issuer`                                                                                                                                 | `https://<OPENIAM_HOST>/idp/oauth2`, derived from the request's scheme and host. Set `org.openiam.oauth.issuer` to publish one fixed value when the IdP is reachable under several host names                                                     |
| `authorization_endpoint`, `token_endpoint`, `userinfo_endpoint`, `revocation_endpoint`, `end_session_endpoint`, `introspection_endpoint` | the endpoints above, built on the same host as the issuer; `introspection_endpoint` from 2026.11.2                                                                                                                                                |
| `jwks_uri`                                                                                                                               | `<issuer>/.well-known/jwks`, an empty key set: signing keys belong to individual clients                                                                                                                                                          |
| `scopes_supported`                                                                                                                       | `openid` followed by the name of every `OAUTH_SCOPE` resource                                                                                                                                                                                     |
| `grant_types_supported`                                                                                                                  | every grant type at least one registered client may use; see [What a client's document lists](#what-a-clients-document-lists)                                                                                                                     |
| `response_types_supported`                                                                                                               | every response type at least one registered client may request                                                                                                                                                                                    |
| `response_modes_supported`                                                                                                               | `query`, `fragment`, `form_post` (from 2026.11.1), listed while any response type is; see [How the response is delivered](#how-the-response-is-delivered)                                                                                         |
| `code_challenge_methods_supported`                                                                                                       | `S256`, listed while `code` is; `plain` is added only when `org.openiam.oauth.pkce.plain.allowed` is `true`                                                                                                                                       |
| `token_endpoint_auth_methods_supported`                                                                                                  | `none`, `client_secret_basic`, `client_secret_post`: the methods a client that is not registered yet can use. Signed client assertions are configured per client, so they are listed only in that client's document                               |
| `introspection_endpoint_auth_methods_supported`                                                                                          | `client_secret_basic`, `client_secret_post`, from 2026.11.2. `none` is not listed: a public client may call without a secret only when its **Token Introspection** setting allows its own tokens, so it is listed in that client's document alone |
| `id_token_signing_alg_values_supported`                                                                                                  | every **Signing Algorithm** set on a registered client                                                                                                                                                                                            |
| `client_id_metadata_document_supported`                                                                                                  | `true` while `org.openiam.oauth.cimd.allowed.origins` lists at least one origin, otherwise `false`                                                                                                                                                |
| `authorization_response_iss_parameter_supported`                                                                                         | `true`                                                                                                                                                                                                                                            |
| `subject_types_supported`                                                                                                                | `public`                                                                                                                                                                                                                                          |
| `claims_supported`                                                                                                                       | the claims every **OAuth Scope** resource can yield, worked out as in [What a client's document lists](#what-a-clients-document-lists)                                                                                                            |

From 2026.11.2 the grant types, response types and signing algorithms are the union of what the registered clients are configured for. While Client ID Metadata Documents are accepted, the union also includes what a client provisioned from one gets: `authorization_code` and `refresh_token`, `code` and `code id_token`, and `RS256`. The scope names and the union are re-read every `org.openiam.oauth.metadata.cache.seconds` (60) seconds, so a new client or scope appears in the document within a minute. Before 2026.11.2 the document listed fixed values: `code`, `authorization_code` and `refresh_token`, `private_key_jwt` among the authentication methods, and all four signing algorithms.

Claude uses metadata-document registration only when this document advertises both `client_id_metadata_document_supported: true` and `none` among the token-endpoint authentication methods, so those two members are the first thing to check when Claude asks for a client id instead.

### The RFC 8414 location

RFC 8414 places an authorization server's metadata at the root of the host, with the issuer's path appended: `https://<OPENIAM_HOST>/.well-known/oauth-authorization-server/idp/oauth2`. Clients that follow RFC 8414 strictly, some MCP clients among them, try that address first. The IdP serves the document only under its own prefix, so the address answers only when a reverse proxy in front of the IdP forwards it to `/idp/oauth2/.well-known/oauth-authorization-server`. The nginx configuration that ships with the OpenIAM containers does so. The Access Gateway cannot rewrite a path, so it has no pattern for this address; on a gateway deployment, add the forward to the web server in front of it or rely on the client falling back to `/idp/oauth2/.well-known/oauth-authorization-server`.

### Discovery through the Access Gateway

A relying party fetches the discovery documents and key sets before it has signed anyone in, so the gateway must let anyone reach them. A content provider set up on 2026.11.2 or later has these anonymous URI patterns, bound to **Def. None Auth Rule** and not cached:

| URI pattern                          | Covers                                           |
| ------------------------------------ | ------------------------------------------------ |
| `/idp/oauth2/.well-known/jwks`       | the tenant key set                               |
| `/idp/oauth2/.well-known/jwks/*`     | the deprecated per-client-ID key set             |
| `*/.well-known/openid-configuration` | every client's discovery document                |
| `*/.well-known/jwks`                 | every client's key set                           |
| `/idp/oauth2/introspect`             | the token introspection endpoint, from 2026.11.2 |

The introspection endpoint authenticates its caller as an OAuth client itself, so the gateway must not. Under the OAuth rule the gateway would take the token being asked about for the caller's own and refuse an unknown one before the endpoint could answer `active: false`. It is not cached, so a revoked token shows as inactive at once.

The suffix patterns `*/.well-known/openid-configuration` and `*/.well-known/jwks` match any path that ends that way, because each client's documents sit under its own **JWT Issuer**. The gateway picks the longest pattern that matches, so the tenant documents keep their own patterns and their 30-minute cache, and every other path under `/idp/oauth2` still falls under `/idp/*`. Anonymous access is safe here: a discovery document or key set holds nothing secret, and the two suffix patterns match only paths that end in those names.

On a content provider set up before the upgrade, add them by hand with those values, or with [Create default URI patterns](https://docs.openiam.com/administration-guide/access/content-providers-and-uri-patterns/content-provider-reference.md#create-default-uri-patterns), which also re-applies the shipped settings to every other default pattern. Without them a relying party that reaches OpenIAM through the gateway is sent the sign-in page instead of the document, and fails to configure itself.

## What a client's document lists

From 2026.11.2 each client's discovery document, `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>/.well-known/openid-configuration`, lists only what that client can use, read from the same settings the authorization and token endpoints enforce. A relying party that negotiates from the document therefore picks something the client accepts. Before 2026.11.2 the document listed the same fixed values for every client, so a relying party could pick a response type or an authentication method the client then refused.

| Member                                                                                                                                               | What decides it                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `issuer`                                                                                                                                             | `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>`; see [Every endpoint](#every-endpoint)                                                                                                                                                                                                                                                                                                                             |
| `client_id`                                                                                                                                          | The client ID, an OpenIAM addition to the document                                                                                                                                                                                                                                                                                                                                                                  |
| `scopes_supported`                                                                                                                                   | `openid` followed by the names of the client's **Default Scopes** that are `OAUTH_SCOPE` resources. From 2026.11.2 any other resource in **Default Scopes**, such as one that lets the client's tokens reach a URI pattern, is not listed, because it cannot be requested by name. It still goes into the client's tokens                                                                                           |
| `grant_types_supported`                                                                                                                              | **Authorization Grant Flow**, as in the table below, plus `refresh_token` when **Use Refresh Token** is on and the flow is not `IMPLICIT`                                                                                                                                                                                                                                                                           |
| `response_types_supported`                                                                                                                           | **Authorization Grant Flow**, as in the table below                                                                                                                                                                                                                                                                                                                                                                 |
| `response_modes_supported`                                                                                                                           | `query`, `fragment`, `form_post`, listed only when the client has a response type                                                                                                                                                                                                                                                                                                                                   |
| `code_challenge_methods_supported`                                                                                                                   | `S256`, and `plain` when `org.openiam.oauth.pkce.plain.allowed` is `true`, listed only when the client can request `code`                                                                                                                                                                                                                                                                                           |
| `token_endpoint_auth_methods_supported`                                                                                                              | **OAuth Client**, **Client Secret** and **Client Assertion Type**; see [Client authentication](#client-authentication)                                                                                                                                                                                                                                                                                              |
| `token_endpoint_auth_signing_alg_values_supported`                                                                                                   | Listed only when the client accepts a signed assertion: `RS256`, `RS384`, `RS512` for `private_key_jwt`, and `HS256`, `HS384`, `HS512` for `client_secret_jwt`                                                                                                                                                                                                                                                      |
| `introspection_endpoint_auth_methods_supported`                                                                                                      | From 2026.11.2: the methods of `token_endpoint_auth_methods_supported` without `none`, which is listed only for a public client whose **Token Introspection** setting is `Own tokens`. Not listed for a client the endpoint refuses: one whose setting is `Not allowed`, a public client that was never allowed, or a client with **Client Assertion Type** `DEVICE_TOKEN`; see [Who may call it](#who-may-call-it) |
| `introspection_endpoint_auth_signing_alg_values_supported`                                                                                           | From 2026.11.2, listed only when the client may introspect with a signed assertion, with the same algorithms as at the token endpoint                                                                                                                                                                                                                                                                               |
| `id_token_signing_alg_values_supported`                                                                                                              | The client's **Signing Algorithm**                                                                                                                                                                                                                                                                                                                                                                                  |
| `subject_types_supported`                                                                                                                            | `public`                                                                                                                                                                                                                                                                                                                                                                                                            |
| `authorization_response_iss_parameter_supported`                                                                                                     | `true`, from 2026.11.2; before, only the tenant document advertised it                                                                                                                                                                                                                                                                                                                                              |
| `claims_supported`                                                                                                                                   | `sub`, `iss`, `aud`, `exp`, `iat`, `nbf`, `jti`, `auth_time`, `nonce`, `at_hash`, `c_hash`, then the claims the client's **Default Scopes** yield; see the list below                                                                                                                                                                                                                                               |
| `authorization_endpoint`, `token_endpoint`, `userinfo_endpoint`, `revocation_endpoint`, `end_session_endpoint`, `introspection_endpoint`, `jwks_uri` | The endpoints in [Every endpoint](#every-endpoint), on the same host as the issuer                                                                                                                                                                                                                                                                                                                                  |

A scope adds claims to `claims_supported` the way OpenIAM fills them in:

* `profile` adds `name`, `given_name`, `family_name`, `middle_name`, `nickname`, `preferred_username`, `profile`, `picture`, `website`, `gender`, `birthdate`, `zoneinfo`, `locale` and `updated_at`.
* `email` adds `email` and `email_verified`; `phone` adds `phone_number` and `phone_number_verified`; `address` adds `address`.
* Each other shipped scope named after a claim, such as `given_name` or `user_name`, adds that one claim. `phone_number` is the exception: OpenIAM never fills it in, so it adds nothing; use `phone`.
* Any other scope whose resource has a Groovy script, a custom claim resolver, adds a claim named after the scope. A script that returns several claims at once still shows only the scope name.
* Any other scope adds nothing. The MCP scopes are of this kind, so a client with only those lists the base claims alone.

| **Authorization Grant Flow**                    | `grant_types_supported` | `response_types_supported`            |
| ----------------------------------------------- | ----------------------- | ------------------------------------- |
| `AUTHORIZATION_CODE`, `AUTHORIZATION_CODE_PKCE` | `authorization_code`    | `code`, `code id_token`               |
| `IMPLICIT`                                      | `implicit`              | `token`, `id_token`, `id_token token` |
| `RESOURCE_OWNER`                                | `password`              | none                                  |
| `CLIENT_CREDENTIALS`, `HL7`                     | `client_credentials`    | none                                  |

A client whose flow uses no browser has no response type, so its document lists no response modes and no PKCE methods. The authorization endpoint refuses it every response type; see [Which response types a client may request](#which-response-types-a-client-may-request).

The hybrid types `code token` and `code id_token token` are not listed. The authorization endpoint accepts them from a code-flow client but returns no access token beside the code, which is an incomplete hybrid response, so a relying party should not be pointed at them.

{% hint style="info" %}
**A client signing with `HS256` or `HS512` does not list `RS256`.** OpenID Connect Discovery requires `RS256` in `id_token_signing_alg_values_supported`, and an OpenID conformance test flags its absence. OpenIAM lists the algorithm the client's ID tokens are actually signed with, so a relying party never expects a signature it will not get. Use `RS256` for a client that a certified relying party or a conformance test reads.
{% endhint %}

One more path is an artefact rather than an endpoint. `org.openiam.oauth.refresh.url` holds `/idp/oauth2/refresh`, and nothing serves it. Do not pass that value on: `/idp/oauth2/token/refresh` is the one that answers.

## Grant flows and `grant_type` are two different lists

The client row stores **one** flow, in the `OAuthAuthorizationGrantFlow` attribute — the field labelled **Authorization Grant Flow**. The values ship as metadata rows grouped under `OAUTH_AUTH_GRANT`, which is why the drop-down is closed and why you cannot invent a flow. OpenIAM spells the concept "grand flow" in some of its own error text; that is not a typo you can fix.

The six stored values, with the label shown in the drop-down and the release each became available. If a value is missing from the drop-down, the deployment is on an earlier release than the one in the last column:

| Stored value              | Drop-down label                    | Since   |
| ------------------------- | ---------------------------------- | ------- |
| `AUTHORIZATION_CODE`      | Authorization Code                 | 4.0.0.0 |
| `AUTHORIZATION_CODE_PKCE` | Proof Key for Code Exchange (PKCE) | 4.2.1.0 |
| `IMPLICIT`                | Implicit                           | 4.0.0.0 |
| `RESOURCE_OWNER`          | Resource Owner                     | 4.0.0.0 |
| `CLIENT_CREDENTIALS`      | Client Credentials                 | 4.0.0.0 |
| `HL7`                     | Health Level Seven International   | 4.1.9.0 |

The `grant_type` string a client asks for is a *different* set of literals from the drop-down values, and the mapping is not one-to-one. Use this table when an application team tells you which grant they intend to use and you have to decide what to set on the row:

| The grant the application asks for             | Accepted when **Authorization Grant Flow** is                    |
| ---------------------------------------------- | ---------------------------------------------------------------- |
| `authorization_code`                           | `AUTHORIZATION_CODE` or `AUTHORIZATION_CODE_PKCE`                |
| `password`                                     | `RESOURCE_OWNER`                                                 |
| `client_credentials`                           | `CLIENT_CREDENTIALS` or `HL7`                                    |
| `urn:ietf:params:oauth:grant-type:device_code` | any — the flow is not checked                                    |
| `refresh_token`                                | anything except `IMPLICIT`, and **Use Refresh Token** must be on |

Anything else is rejected with `invalid_request` and the description `Client doesn't support <grant_type> grant_type`.

Notes that matter in practice:

* **Device code** has no stored flow value of its own, and no drop-down entry. Any client can ask for it, whatever you set on the row; OpenIAM resolves it against the device record, takes the user from it, and issues a token with refresh disabled however the client is configured.
* The device-code grant is also **not** subject to the entitlement check, so it can never fail with `insufficient_rights`. If you are relying on entitlement to fence off a client, this grant is a hole in it — see [Fence the client](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc.md#fence-the-client-oauth-entitlement-enforcement-is-off-out-of-the-box).
* **Resource owner password** authenticates through the normal login provider, so account lockout applies: a locked login produces `invalid_request` / `Authentication fails for blocked login`.
* `client_credentials` on a client bound to an AI Agent non-human identity that owns a service user issues, from 2026.10.2, a token whose subject is that service user, with the client's scopes filtered by the service user's entitlements, and only while the identity is Active and unexpired: otherwise the request is refused with `invalid_client` and `The client's agent is pending approval`, `is suspended`, `is a draft`, `is decommissioned`, `has expired` or `has no service user` as the description. The binding is described in [Govern AI agents as non-human identities](https://docs.openiam.com/administration-guide/federation/mcp-server/mcp-agents.md). A client that is not bound still receives a token whose subject is the literal user ID `"0001"`, the built-in administrator, with every scope the client is configured with, while `org.openiam.oauth.client_credentials.legacy.subject` is `true`, and the IdP logs a warning once per client that does; 2026.10.2 ships it `true` and the next release ships it `false`, after which an unbound client is refused with `invalid_client` and `The client is not bound to an agent record`. No application should make an authorization decision on the `0001` subject.
* A client bound to an AI Agent identity that is not Active gets no token of any grant from 2026.10.2, with the same `invalid_client` descriptions, and the authorization endpoint sends its sign-ins back with `error=access_denied` and the description before any consent is shown.
* `AUTHORIZATION_CODE_PKCE` makes PKCE mandatory. A client library that does not implement it cannot use the row, and the only supported challenge methods are `S256` and `plain`. From 2026.10.2 a **public** client, one on this flow with no **Client Secret**, must use `S256`: a `plain` or missing `code_challenge_method` is refused with `invalid_request` at the authorization endpoint, and a code issued with a `plain` challenge is refused with `invalid_grant` at the token endpoint, unless `org.openiam.oauth.pkce.plain.allowed` is `true`. A client with a secret may keep using either.
* Authorization codes live five minutes, are single use, and the lifetime is not configurable.
* **A refresh token is single use** since 2026.10.1. Redeeming it returns the token it belongs to and removes that token in the same database transaction, so presenting the same refresh token a second time fails as an unknown refresh token; the client must keep the refresh token the `refresh_token` response carried. Before 2026.10.1 the removal never reached the database, so a client with **Multiple Active Tokens** allowed could redeem one refresh token as often as it liked while the token was still valid. From 2026.10.2 the `refresh_token` grant also checks that the token was issued to the client presenting it: a token issued to another client, and a token that is unknown or already redeemed, are refused with `invalid_grant`, and the refusal is the failure reason on the `GET_TOKEN` audit event.

## Client authentication

Two separate settings are involved and they are frequently conflated.

**How the shared secret is presented** — exactly two values, selected by the **OAuth Client** field and stored in `OAuthClientAuthType`, shipped as metadata rows grouped under `OAUTH_CLIENT_AUTH_TYPE`:

| Value          | Label                | How the application presents the secret             |
| -------------- | -------------------- | --------------------------------------------------- |
| `BASIC_HTTP`   | Basic Authentication | In the HTTP Basic authentication header             |
| `REQUEST_BODY` | Request body         | In the body of the request, alongside the client ID |

**The secret itself is shown once**, from 2026.11.1. Webconsole generates it when the client is created and shows it in that answer only; no Webconsole screen and no read of an authentication provider through its REST API returns a stored secret, and saving an existing client keeps the stored secret when the request leaves it out. A secret reaches the browser in three answers only: a new client, a **Regenerate secret**, and the save of a client that had no secret under a grant flow that needs one. A regenerated secret replaces the old one at once: tokens already issued stay valid until they expire, and the next token or refresh request needs the new secret. Secrets are still stored as they are given, not hashed. Audit events recorded before 2026.11.1 can hold a secret in the request body of a client save, because every save sent it back; regenerate any secret that may have been exposed that way. The procedure is in [Replace a lost client secret](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc.md#replace-a-lost-client-secret).

**Assertion-based authentication** — a separate axis, three values, selected by the **Client Assertion Type** field:

| Value            | `client_assertion_type` string                                                   |
| ---------------- | -------------------------------------------------------------------------------- |
| `JWT_BEARER`     | `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`                         |
| `DEVICE_TOKEN`   | `org:openiam:params:oauth:client-assertion-type:x-openiam-firebase-device-token` |
| `DEFAULT_CLIENT` | `default-client`                                                                 |

What the client asks for wins: OpenIAM applies the assertion type the client names, falls back to the value stored on the row when the client names none, and treats anything it does not recognize — including `DEFAULT_CLIENT` — as ordinary client-secret authentication.

Under `AUTHORIZATION_CODE_PKCE` that ordinary path **skips secret validation entirely** when the client supplies no secret at all. That is deliberate — RFC 7636 public clients — but it means a PKCE row with a secret set does not force the client to send it. Confirm it on your own deployment before you treat **Client Secret** as a control: have the application team complete a sign-in with the secret omitted, and it still succeeds.

A client that has no secret at all on that flow is a **public client**, authenticating with the method RFC 7591 calls `none`; every client provisioned from a Client ID Metadata Document is one. From 2026.10.2 the tenant metadata document advertises `none` for that reason, and public clients are held to the `S256` rule above.

From 2026.11.2 the client's discovery document lists in `token_endpoint_auth_methods_supported` only the methods the token endpoint accepts from that client:

| The client row                                                                                                                            | Listed                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **OAuth Client** `Basic Authentication`, a **Client Secret** set, no **Client Assertion Type** or `DEFAULT_CLIENT`                        | `client_secret_basic`                                                        |
| **OAuth Client** `Request body`, a **Client Secret** set, no **Client Assertion Type** or `DEFAULT_CLIENT`                                | `client_secret_post`                                                         |
| **Authorization Grant Flow** `AUTHORIZATION_CODE_PKCE`, **OAuth Client** `Request body`, no **Client Assertion Type** or `DEFAULT_CLIENT` | `none` as well, because the secret is not checked when the client sends none |
| **Authorization Grant Flow** `HL7`, **OAuth Client** `Request body`, **Client Authentication JWT Validation Key URL** set                 | `private_key_jwt`                                                            |
| **Authorization Grant Flow** `HL7`, **OAuth Client** `Request body`, **Client Authentication JWT Validation Key** set                     | `client_secret_jwt`                                                          |

A client with no **OAuth Client** value lists none. `revocation_endpoint_auth_methods_supported` is no longer published: before 2026.11.2 it listed `private_key_jwt` alone, which the revocation endpoint does not require. Before 2026.11.2 every client's document listed `client_secret_post`, `client_secret_basic` and `private_key_jwt` whatever the client was configured for.

## Signing algorithms and JWKS

The client's **Signing Algorithm** field, stored in the `JwtAlgorithm` attribute, decides how the JWT is signed. Four values ship as metadata rows grouped under `OAUTH_SIGN_ALG`:

| Value   | Label                           | Since   |
| ------- | ------------------------------- | ------- |
| `HS256` | HMAC using SHA-256              | 4.1.6.0 |
| `HS512` | HMAC using SHA-512              | 4.0.0.0 |
| `RS256` | RS-256                          | 4.1.8.0 |
| `RS512` | RSASSA-PKCS-v1\_5 using SHA-512 | 4.0.0.0 |

What the JWKS endpoint publishes depends on which family you chose, and the difference is a security decision, not a formatting one:

* **HMAC (`HS256`, `HS512`)** — the only key an HS-signed client has is the shared secret, so from 2026.10.1 the JWKS URL publishes an **empty key set**, `{"keys":[]}`, for it. Only a party that already holds the secret can verify its tokens, which is what RFC 7518 intends for HMAC; use `RS256` or `RS512` for anything a third party validates. Releases before 2026.10.1 published the secret itself as an octet key. If a relying party was reading it from there, hand the secret over out of band or move the client to an RSA algorithm.
* **RSA (`RS256`, `RS512`)** — the published key is the RSA **public** key, identified by the provider's own ID in `kid`, with `use` set to `sig` and `alg` set to the configured algorithm. From 2026.10.1 no private member is published and nothing is written to the IdP log. Releases before 2026.10.1 included the private exponent in the key set and logged it at INFO level, so treat the JWKS URL and the IdP log of an earlier release as private material, and regenerate the client's key pair when you upgrade if either was ever reachable by a third party.

  From 2026.11.1 the key also carries `x5c`, the same public key wrapped in a self-signed X.509 certificate, and `x5t#S256`, that certificate's SHA-256 thumbprint. Relying parties that accept only a certificate need it, among them SharePoint Server builds before Version 24H2: see [Sign in to SharePoint Server through OpenID Connect](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc/sharepoint-server-oidc.md). The certificate is built from the client's existing key pair, so nothing is stored and regenerating the key pair changes it. It is named `CN=<client id>, OU=OpenIAM, O=OpenIAM`, is valid from 2000-01-01 with no expiry date, may only verify signatures, and is not a certificate authority.
* **Anything else, or no algorithm set** — the endpoint fails instead of answering. The message is `OAuth provider '<client_id>' does not have a valid signing algorithm: <alg>`, or, when the provider or its algorithm is missing entirely, `OAuth provider does not exists or have a signing algorithm` .

The discovery document's `id_token_signing_alg_values_supported` contains exactly the one algorithm configured on that client, which makes the document the fastest way to confirm **Signing Algorithm** saved.

From 2026.11.1 every ID token carries `nbf` (not before), set to its issue time, `iat`. SharePoint Server rejects an ID token without it.

The per-client discovery document and key set are always returned as `application/json`, whatever the `Accept` header asks for. Before 2026.11.1 a browser, which prefers XML, was sent both as XML. The tenant metadata document and the tenant key set follow the same rule from 2026.11.2.

## Client ID Metadata Documents

A Client ID Metadata Document is the JSON an OAuth client publishes at an `https` URL and then uses as its `client_id`. The MCP authorization specification of 2026-07-28 uses it in place of dynamic client registration, and Claude's hosted apps and Claude Code ship their own, for example `https://claude.ai/oauth/claude-code-client-metadata`. From 2026.10.2 the IdP accepts such a `client_id` on the authorization endpoint and registers the client itself, so you do not create a row by hand for every MCP client. The procedure is in [Let an MCP client register itself](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc.md#let-an-mcp-client-register-itself); this section is what happens underneath.

On the first authorization request that carries an `https` URL as `client_id`:

1. The URL's origin (scheme and host) must be in `org.openiam.oauth.cimd.allowed.origins`, which ships as `https://claude.ai`. Any other origin is refused with `invalid_client`. An empty list disables the feature, and the tenant metadata document then advertises `client_id_metadata_document_supported: false`.
2. The document is fetched, under a guard: the URL must be `https` with no user information or fragment; the host is resolved first and every address must be public (loopback, private, link-local, carrier-grade NAT, multicast, reserved and the IPv6 equivalents are refused); the connection goes to the resolved addresses only; redirects are not followed; connecting, the socket and the response each time out after five seconds; the body is capped at 64 KB and must be `application/json`. The fetch happens on the authorization endpoint only, never on the token endpoint.
3. The document is validated: its `client_id` must equal the URL; it must list at least one `redirect_uris` entry, each an `https` URL or an `http` URL on `localhost`, `127.0.0.1` or `::1`; and `token_endpoint_auth_method`, when present, must be `none`.
4. An `OAUTH_CLIENT` authentication provider is created with the attributes below, and its resource is made public so the entitlement check does not refuse every user.

The document is cached per URL for the `Cache-Control: max-age` its origin sends, clamped to between 60 seconds and `org.openiam.oauth.cimd.cache.max.seconds` (86400); a failed fetch is remembered for 60 seconds. On later requests the client's name and redirect URIs are brought in line with the document when it changed, and a document that cannot be fetched leaves the client as registered.

| Attribute                     | Value                                                                                                                            |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Name                          | `<client_name> (<host>)` from the document, or the host alone, within 50 characters                                              |
| `OAuthClientID`               | the document URL                                                                                                                 |
| `OAuthAuthorizationGrantFlow` | `AUTHORIZATION_CODE_PKCE`                                                                                                        |
| `OAuthClientAuthType`         | `REQUEST_BODY`; no `OAuthClientSecret` is created                                                                                |
| `OAuthRedirectUrl`            | the document's `redirect_uris`                                                                                                   |
| `OAuthClientScopes`           | the ids of the scope names in `org.openiam.oauth.cimd.default.scopes`; a name the deployment does not have is skipped and logged |
| `OAuthUseRefreshToken`        | `true`                                                                                                                           |
| `OAuthClientSkipAllowDialog`  | `false`, so the consent dialog is shown                                                                                          |
| `IsMultiActiveTokenAllowed`   | `true`, so a user may hold one token per device                                                                                  |
| `OAuthTokenExpiration`        | `org.openiam.oauth.cimd.token.expiration.seconds` (3600) converted to minutes                                                    |
| `JwtAlgorithm`                | `RS256`                                                                                                                          |
| `JwtIssue`                    | a slug of the URL's host and path plus eight characters of its SHA-256, so the per-client discovery URL answers                  |
| Managed system                | the deployment's default managed system                                                                                          |

Two things differ for these clients on the authorization endpoint. A `redirect_uri` on a loopback host matches the registered entry whatever its port, because a native client such as Claude Code listens on a port chosen at run time; every other redirect URI is matched exactly as before. And the consent page names the host the document came from next to the client name, because the name is self-asserted, and warns when every registered redirect URI is local.

## The `resource` parameter

From 2026.10.2 both the authorization and the token endpoint accept the RFC 8707 `resource` parameter, which an MCP client sends to say which server the token is for. The resources the IdP knows are configured, not stored:

| Property                                | Shipped value                        | Meaning                                                                                   |
| --------------------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------- |
| `org.openiam.oauth.resources`           | `mcp`                                | the names of the configured resources, comma-separated                                    |
| `org.openiam.oauth.resource.mcp.url`    | empty                                | the resource's canonical URL; empty derives `https://<OPENIAM_HOST>/mcp` from the request |
| `org.openiam.oauth.resource.mcp.scopes` | the four `openiam:mcp:*:read` scopes | the scope names the resource accepts                                                      |

A `resource` that names none of the configured resources, compared with scheme and host case-insensitively and a trailing slash ignored, is refused with `invalid_target`. One that does narrows the authorization to that resource's scope names: the consent dialog asks only for them, and a request that would be left with no scope is refused with `invalid_scope`. The token endpoint validates the value the same way, and from the second part of 2026.10.2 it also compares it with the authorization's: the code stores the resource it was issued for, a code exchange that names a different one is refused with `invalid_target` and `The resource parameter differs from the one the authorization was granted for`, and one that names none inherits the code's. The token carries the resource as its audience, which the token-info endpoint reports as `audience`, and a refreshed token keeps the audience of the token it replaces. Which scopes a token for a resource carries, and how a refresh works them out again, changed in 2026.11.1; see [Which scopes a token for a resource carries](#which-scopes-a-token-for-a-resource-carries). The MCP server does not yet compare the audience with its own URL, as [the MCP reference](https://docs.openiam.com/administration-guide/federation/mcp-server/mcp-server-reference.md) notes under what 2026.10.2 does not do.

## Authorization responses: `iss` and encoded parameters

From 2026.10.2 every redirect back to the client, on success and on error, carries `iss=<issuer>` (RFC 9207), so a client can tell which authorization server answered. From 2026.11.2 it is the issuer of the document the client discovered OpenIAM with: the client's own issuer, `https://<OPENIAM_HOST>/idp/oauth2/<JWT_ISSUER>`, when the request's scope includes `openid`, because the ID token it receives carries that issuer; and the tenant issuer, `https://<OPENIAM_HOST>/idp/oauth2`, for any other request, such as an MCP client's. Before 2026.11.2 it was always the tenant issuer, which an OpenID Connect client that compares `iss` with the issuer it discovered refused. From 2026.11.2 both documents advertise `authorization_response_iss_parameter_supported: true`; before, only the tenant document did. Every parameter on that redirect, `code`, `state`, `error`, `id_token` and the implicit-flow tokens, is `application/x-www-form-urlencoded` as RFC 6749 requires. Before 2026.10.2 the values were appended raw, so a `state` containing a space or an ampersand came back altered.

### How the response is delivered

From 2026.11.1 the authorization endpoint reads the `response_mode` parameter (OAuth 2.0 Multiple Response Types, OAuth 2.0 Form Post Response Mode). It decides how the code, the tokens, `state` and `iss` reach the client's redirect Uniform Resource Identifier (URI):

| `response_mode` | How the response arrives                                                                                                                 |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `query`         | In the redirect's query string, after `?`                                                                                                |
| `fragment`      | In the redirect's fragment, after `#`. The browser never sends the fragment to a server, so only script in the client's page can read it |
| `form_post`     | As an HTML form that submits itself to the redirect URI with `POST`. Nothing travels in the URL                                          |

A request without `response_mode` gets the default of its `response_type`:

| `response_type`                        | Default    |
| -------------------------------------- | ---------- |
| `code`                                 | `query`    |
| `token`, `id_token`, `token id_token`  | `fragment` |
| `code id_token`, `code token` (hybrid) | `fragment` |

The authorization endpoint applies three rules:

* **A token is never put in a query string.** `response_mode=query` with a `response_type` that returns an access token or an ID token is refused with `invalid_request`.
* **An unknown `response_mode` is refused** with `invalid_request`. Values are case-sensitive: `form_post`, not `FORM_POST`.
* **Errors follow the requested mode.** Once the redirect URI has been matched against the client's registered ones, an error such as `access_denied` comes back in the mode the client asked for. An error found before that point, such as an unknown client or an unregistered redirect URI, is shown on the IdP's own error page and never sent to the client. When the `response_mode` itself is refused, the error comes back in the `response_type`'s default mode.

The mode is kept across the consent screen. When the user clicks **Allow** or **Deny**, a `form_post` client receives the result as a posted form, the same as when consent is skipped.

{% hint style="warning" %}
**Behavior change in 2026.11.1: the hybrid `code id_token` response moved to the fragment.** Before 2026.11.1 the IdP returned a hybrid response, including the ID token, in the query string. A client that reads the hybrid response from the query string must either read the fragment or send `response_mode=form_post`.
{% endhint %}

### Which response types a client may request

The client's **Authorization Grant Flow** decides which `response_type` values the authorization endpoint accepts. Any other is refused with `unsupported_response_type`, sent to the client's redirect URI in the requested mode:

| **Authorization Grant Flow**                    | Accepted `response_type`                               |
| ----------------------------------------------- | ------------------------------------------------------ |
| `AUTHORIZATION_CODE`, `AUTHORIZATION_CODE_PKCE` | any that includes `code`                               |
| `IMPLICIT`                                      | any that includes `token` or `id_token` and not `code` |
| `RESOURCE_OWNER`, `CLIENT_CREDENTIALS`, `HL7`   | none: these flows never use the browser                |

{% hint style="warning" %}
**Behavior change in 2026.11.2: two kinds of request are now refused.** Before 2026.11.2 the authorization endpoint accepted any response type from a client on `RESOURCE_OWNER`, `CLIENT_CREDENTIALS` or `HL7`, and issued an authorization code to an `IMPLICIT` client that asked for `code token` or `code id_token`, although neither client could exchange it. Both are now refused with `unsupported_response_type`. A client that relied on either must move to `AUTHORIZATION_CODE_PKCE`.
{% endhint %}

#### The `form_post` page

The page OpenIAM returns for `form_post` holds the response as hidden form fields and submits them with a single script. The page:

* escapes every value, so a hostile `state` or `error_description` cannot run as script
* sends `Cache-Control: no-store` and `Referrer-Policy: no-referrer`, because it carries a code or a token
* sends its own Content Security Policy, `default-src 'none'` with a one-time nonce for its submit script, `base-uri 'none'` and `frame-ancestors 'none'`
* shows a **Continue** button when the browser has JavaScript turned off

If a reverse proxy in front of the IdP adds its own Content Security Policy with `form-action 'self'`, the browser blocks the post to the client. Exempt `/idp/oauth2/authorize` from that header, or allow the clients' redirect origins in `form-action`.

{% hint style="info" %}
**If a client does not receive the response.** The form arrives at the client as a cross-site POST with `Origin: null` and no `Referer`, so its callback must accept that; the `state` check is what protects it. Cookies the client keeps for `state` or `nonce` must be `SameSite=None; Secure` when it runs on a different domain from OpenIAM, because the browser does not send `SameSite=Lax` cookies with a cross-site POST. If the callback path sits behind mod\_openiam on a different domain, exclude it from protection: mod\_openiam's own cookies are `SameSite=Lax`, so the POST is sent to the login page and the response is lost.
{% endhint %}

## Token introspection

From 2026.11.2 OpenIAM implements OAuth 2.0 Token Introspection (RFC 7662). A resource server, an API that receives OpenIAM access tokens, asks the IdP whether a token is still active and what it is for, instead of trusting the token blindly or calling the deprecated token-information endpoint. Both discovery documents publish the endpoint as `introspection_endpoint`.

{% code overflow="wrap" %}

```bash
curl -s -X POST "https://<OPENIAM_HOST>/idp/oauth2/introspect" \
  -u "<CLIENT_ID>:<CLIENT_SECRET>" \
  -d "token=<TOKEN>" -d "token_type_hint=access_token"
```

{% endcode %}

The endpoint answers POST only, with the form in the body. `token` is required; `token_type_hint` is `access_token` or `refresh_token` and only decides which kind is looked up first. A token sent in the URL is refused with `400 invalid_request`, because a URL lands in access logs.

### Who may call it

Each OAuth client's **Token Introspection** field, on its page under **Access Control → Authentication Providers**, decides which tokens it may ask about:

| **Token Introspection** | The client may ask about                                               | For                                   |
| ----------------------- | ---------------------------------------------------------------------- | ------------------------------------- |
| `Own tokens`            | tokens issued to itself; every other token is answered `active: false` | a client checking its own tokens      |
| `Any token`             | tokens issued to any client                                            | a resource server                     |
| `Not allowed`           | nothing; the endpoint refuses it                                       | a client that should never introspect |

A client whose field was never saved, every client that existed before 2026.11.2 among them, gets `Own tokens` when it can prove who it is and `Not allowed` when it cannot.

A client proves who it is with its secret, in the Basic header or the body as its **OAuth Client** field says, or with a signed client assertion where it has a **Client Authentication JWT Validation Key URL** or **Client Authentication JWT Validation Key**. A **public client**, one on `AUTHORIZATION_CODE_PKCE` with none of these, cannot prove who it is: anyone may send its client ID. So:

* A public client set to `Own tokens` calls with its `client_id` alone, and is told about its own tokens only. The SelfService AI assistant's client, `openiam-ai-assistant`, ships set this way, because the assistant checks the tokens its browser sends.
* A public client is never given `Any token`. The form does not offer it, a save that asks for it is refused with `Only an OAuth client that authenticates with a secret or a signed client assertion may introspect any token`, and a public client stored with it anyway is refused at the endpoint, with a warning in the IdP log.
* Any other client must send its credential every time, whatever its setting.

Every refused caller, including a client with **Client Assertion Type** `DEVICE_TOKEN`, gets `401` with `invalid_client` / `Client authentication failed` and a Basic challenge. The answer is the same whether the client is unknown, its secret is wrong or its setting does not allow it. A client bound to an AI agent record is refused while the record is not Active. An unknown value stored in the field, from a hand edit for example, is read as `Not allowed`.

### Set up a resource server

1. Create an OAuth client for the resource server on **Access Control → Authentication Providers**, with **Authorization Grant Flow** `AUTHORIZATION_CODE`.
2. Set **OAuth Client** to the way the resource server's library sends its secret: `Basic Authentication` when it sends an `Authorization: Basic` header, which most libraries do by default, Spring Security's opaque-token support among them; `Request body` when it posts `client_secret` in the form. A secret sent the other way is refused with `401 invalid_client`, even when it is correct.
3. Set **Token Introspection** to `Any token`, and save. Copy the secret that is shown once.
4. Configure the resource server's OAuth library with the introspection endpoint, the client ID and the secret.

The client only introspects and never signs anyone in, so whatever its **Redirect URL** names is never used. Do not use a `CLIENT_CREDENTIALS` client for this. Its secret alone obtains tokens, which a resource server never needs, and while `org.openiam.oauth.client_credentials.legacy.subject` is `true` a `client_credentials` client with no agent record receives tokens for the built-in administrator.

### What the answer contains

An active token is answered `200` with these members; a member with no value is left out:

| Member       | Value                                                                                                                     |
| ------------ | ------------------------------------------------------------------------------------------------------------------------- |
| `active`     | `true`                                                                                                                    |
| `scope`      | the scopes the token holds, by name, separated by spaces; `openid` is included when the token was issued with an ID token |
| `client_id`  | the client the token was issued to                                                                                        |
| `username`   | the user's primary login                                                                                                  |
| `token_type` | `Bearer` for an access token, `refresh_token` for a refresh token                                                         |
| `exp`, `iat` | expiry and issue time, in seconds since the epoch; a refresh token has no `exp`                                           |
| `sub`        | the user's ID                                                                                                             |
| `aud`        | the audience the token was issued for, when one was recorded                                                              |
| `iss`        | the client's issuer when the token came with an ID token, otherwise the tenant issuer                                     |

Every other token is answered `200` with `{"active": false}` and nothing else, so nothing is disclosed about a token the caller may not see. A token is inactive when any of these holds:

* it was never issued, has been revoked, or has expired;
* it is older than the client's maximum session time;
* the client it was issued to no longer exists, or is bound to an AI agent record that is not Active;
* the user can no longer sign in: the user is deleted, or has the status `DEACTIVATED`, `INACTIVE`, `LEAVE`, `LEAVE_WITH_PAY`, `LEAVE_OF_ABSENCE`, `TERMINATED` or `DECEASED`, or the secondary status `DISABLED`, `LOCKED` or `LOCKED_ADMIN`;
* it is a refresh token and the caller is not the client that holds it.

A signed JWT access token is checked the same way a protected request checks it, and described from its claims. Answers carry `Cache-Control: no-store`. When the IdP cannot ask the backend, it answers `503 server_error` rather than `active: false`, so a resource server can tell an outage from a revoked token.

### The deprecated token-information endpoint

`/idp/oauth2/token/info` is deprecated from 2026.11.2. It still answers as before, so nothing that calls it breaks, but every answer now carries `Deprecation: true` and a `Link` header naming `/idp/oauth2/introspect`. The IdP logs a warning once a day for each registered client that calls it, and once a day for all anonymous callers together, so you can find the callers that still have to move. Move them to the introspection endpoint; its answer uses the RFC 7662 member names above instead of `user_id`, `expires_on` and `expired`.

While `org.openiam.oauth.token.info.public` is `false`, the endpoint now accepts a caller by the introspection endpoint's rules. Before 2026.11.2 a public PKCE client passed with its client ID alone and could read any token. Now such a client is accepted only when its **Token Introspection** setting is `Own tokens`, and it is told about its own tokens only; any other token is answered `Authorization token is not found`. A client that proves who it is is still answered about any token, whatever its setting, as before. A refused caller gets `invalid_client` instead of `unauthorized_client`.

## Sign-out: the end-session endpoint

From 2026.11.1 OpenIAM implements OpenID Connect RP-Initiated Logout 1.0. An application ends the user's OpenIAM session by sending the browser to the end-session endpoint, which both discovery documents publish as `end_session_endpoint`:

{% code overflow="wrap" %}

```
https://<OPENIAM_HOST>/idp/oauth2/logout?id_token_hint=<ID_TOKEN>&post_logout_redirect_uri=<RETURN_URL>&state=<STATE>
```

{% endcode %}

The endpoint answers GET and POST. Send the browser there with a redirect (GET): a POST from another site arrives without the user's session cookie, because browsers withhold `SameSite=Lax` cookies from cross-site POSTs, and the session then stays open.

| Parameter                  | Required                                          | Meaning                                                                                                                                                   |
| -------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id_token_hint`            | Recommended                                       | An ID token OpenIAM issued to the application. It may have expired: OpenIAM checks its signature, issuer and audience, not its expiry                     |
| `client_id`                | When a return URL is sent without `id_token_hint` | The application's client ID. When both are sent, they must name the same client                                                                           |
| `post_logout_redirect_uri` | No                                                | Where the browser goes after sign-out. It must be registered on the client; see [Which return URLs are accepted](#which-return-urls-are-accepted)         |
| `state`                    | No                                                | Returned unchanged to `post_logout_redirect_uri`. Printable ASCII characters and spaces only, at most 2,048 characters                                    |
| `ui_locales`               | No                                                | Preferred page languages, as BCP 47 tags separated by spaces, for example `fr-FR en`. The first language OpenIAM offers is used for the pages that follow |

### What the user sees

| The request                                           | What happens                                                                                                                                           |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id_token_hint` names the signed-in user              | The user is signed out without a question and returned to `post_logout_redirect_uri`                                                                   |
| No `id_token_hint`, or one issued to a different user | OpenIAM asks `Do you want to sign out?`, naming the application. **Sign out** continues; **Stay signed in** keeps the session and goes to Self Service |
| Nobody is signed in to OpenIAM                        | The browser goes straight to `post_logout_redirect_uri`                                                                                                |

The question stops a link on another website from signing users out without their knowledge.

Sign-out runs through the IdP's own logout. It ends the OpenIAM session, revokes the user's OAuth token, signs the user out of SAML applications through single logout, and only then returns the browser to `post_logout_redirect_uri`. Without a return URL the user ends on the OpenIAM signed-out page. Each sign-out is audited as `LOGOUT`, with the client it came from.

### Which return URLs are accepted

`post_logout_redirect_uri` must exactly match, including case and any query string, one of the values in the client's **Post-logout Redirect URL** field (`OAUTH_POST_LOGOUT_REDIRECT_URL`). The client's **Redirect URL** values do not count: RP-Initiated Logout accepts only URLs registered for sign-out. A client whose field is empty accepts no return URL, so its users end on the OpenIAM signed-out page.

Clients upgraded from an earlier release start with an empty field. Add their sign-out return URLs before you point applications at the end-session endpoint. Applications that read the discovery document can start using the end-session endpoint on their own after the upgrade, because it is now published there.

The built-in read-only clients, such as Self Service and Webconsole, cannot save a post-logout URL, so the end-session endpoint never returns their users to another page.

### Through the Access Gateway

The gateway must let anyone reach the end-session endpoint: a user may arrive already signed out, and any user, not only an administrator, may sign out. A content provider set up on 2026.11.1 or later has the three anonymous URI patterns this needs: `/idp/oauth2/logout`, `/idp/oauth2/logout/confirm` and `/idp/oauth2/logout/confirm/info`, bound to **Def. None Auth Rule** and not cached. On a content provider set up before the upgrade, add them by hand with those values, or with [Create default URI patterns](https://docs.openiam.com/administration-guide/access/content-providers-and-uri-patterns/content-provider-reference.md#create-default-uri-patterns), which also re-applies the shipped settings to every other default pattern. Without them the paths fall under `/idp/*`, so a signed-out user gets the sign-in page instead of the return URL, and a user who is not an administrator is refused.

### When sign-out fails

OpenIAM answers a request it cannot honor with its OAuth error page and status 400, never with a redirect, because the return URL has not been verified.

| Symptom                                                                              | Likely cause                                                                                                              | Resolution                                                                                    |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `invalid_request - The post_logout_redirect_uri is not registered for this client`   | The URL is not in **Post-logout Redirect URL**. **Redirect URL** values are not accepted for sign-out                     | Add the exact URL the application sends to **Post-logout Redirect URL**                       |
| `invalid_request - The state parameter is not valid`                                 | `state` holds a line break, a tab, another control character or a non-ASCII character, or is longer than 2,048 characters | Send `state` as printable ASCII, as RFC 6749 defines it, for example a random base64url value |
| `invalid_request - A post_logout_redirect_uri needs an id_token_hint or a client_id` | OpenIAM cannot tell which client the return URL belongs to                                                                | Send `id_token_hint` or `client_id` with it                                                   |
| `invalid_request - The client_id does not match the id_token_hint`                   | The ID token was issued to another client                                                                                 | Send the ID token the application itself received                                             |
| `invalid_token - The id_token_hint is not a valid ID token`                          | The token was altered, truncated, or signed by another server                                                             | Send the ID token exactly as received. Its expiry does not matter                             |
| `invalid_token - The id_token_hint was not issued by this server`                    | The token's issuer names another host name than the one the browser uses                                                  | Reach OpenIAM on one host name; the issuer is built from it                                   |
| The application signs out, but the next sign-in is silent                            | The application POSTs the sign-out from its own site, so the browser sent no session cookie                               | Redirect the browser to the endpoint (GET) instead                                            |

### The older sign-out through the revoke endpoint

`/idp/oauth2/revoke` with `id_token_hint` still signs users out, and from 2026.11.1 it behaves like the end-session endpoint: it ends the session, accepts an expired hint, and asks for confirmation when the hint names another user. It keeps three old behaviors for compatibility: it compares the return URL ignoring case and anything from `?` onward, it accepts the **Redirect URL** values while **Post-logout Redirect URL** is empty, and it reports errors as JSON. Move applications to the end-session endpoint.

### Properties

| Property                                 | Default                            | Meaning                                                                   |
| ---------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| `org.openiam.oauth.end.session.url`      | `${org.openiam.oauth.path}/logout` | Path of the end-session endpoint, as published in the discovery documents |
| `org.openiam.oauth.end.session.stay.url` | `/selfservice`                     | Where **Stay signed in** sends the user                                   |

## The scopes OpenIAM ships

Scopes are resource rows of type `OAUTH_SCOPE`. A fully migrated deployment has **25** of them, arriving in four batches:

| Since     | Scope names                                                                                                                                                                                    |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 4.0.0.0   | `name`, `given_name`, `family_name`, `middle_name`, `nickname`, `preferred_username`, `email`, `gender`, `birthdate`, `zoneinfo`, `locale`, `phone_number`, `address`, `updated_at`, `picture` |
| 4.1.5.0   | `user_name`                                                                                                                                                                                    |
| 4.2.1.0   | `profile`, `phone`, `phone_number_verified`, `email_verified`, `website`                                                                                                                       |
| 2026.10.2 | `openiam:mcp:identity:read`, `openiam:mcp:access:read`, `openiam:mcp:workflow:read`, `openiam:mcp:audit:read` — the MCP server's scopes, the only non-public ones (see below)                  |

**`profile` is present**, since 4.2.1.0. Older published documentation lists only the fifteen 4.0 scopes; the scope picker on the client row is authoritative for your deployment, so open it and count. On MySQL the phone scope you will see is `phone_number`.

**`openid` is not a resource row.** OpenIAM advertises `openid` in the per-client discovery document unconditionally, on the assumption that every OAuth client supports it, then appends the client's own configured scopes, by name from 2026.10.2 and by resource id before. So the advertised list is `openid` plus the client's **Default Scopes**, never the full catalog; from 2026.11.2 only those that are `OAUTH_SCOPE` resources. The tenant metadata document is the one that lists every scope.

**What a requested `scope` is checked against**, since 2026.10.1. On an authorization request OpenIAM splits the `scope` parameter on spaces, ignores `openid`, and resolves every other name to a scope resource:

* A name that is not a scope resource — a typo, or a scope the deployment does not have — ends the request with `error=invalid_scope` on the redirect. Before 2026.10.1 such a request silently fell back to the client's **Default Scopes**, so a misspelt scope went unnoticed and the client received scopes it had not asked for.
* A scope that exists but is not in the client's **Default Scopes** is dropped from the request. If nothing is left — every requested scope is one the client was not registered for — the request also ends with `invalid_scope`. A token therefore never carries a scope the client was not configured with.
* A request with no `scope`, or with `openid` alone, still receives the client's **Default Scopes**, as before.
* From 2026.11.1, a request that names a `resource`, leaves the user nothing to consent to, and names only scopes the user may neither consent to nor already holds for the client ends with `error=invalid_scope` and `None of the requested scopes can be granted to the signed-in user` on the redirect, instead of a code for a token with no scope. A request that names at least one scope the user can have still receives a code, and the token response states the narrower set it was granted.

Whatever survives is then filtered by the user's entitlement to each scope resource, exactly as a request without `scope` is — see the note on public scope resources below.

Whether an ID token is issued is decided by what the *client asks for*, not by the client row. From 2026.10.2 the requested scopes are read space-separated on a refresh as well as on the initial sign-in, and a comma-separated list is still accepted on a refresh, so a client that followed the earlier advice keeps receiving its ID token. Before 2026.10.2 a refresh read the scopes comma-separated only, and a client that reused its space-separated sign-in string got no ID token back.

**Which scopes a refreshed token carries** follows the client's **Authorization Grant Flow**, from 2026.10.2. Under `AUTHORIZATION_CODE` and `AUTHORIZATION_CODE_PKCE` the refreshed token carries the scopes the user consented to on the authorization page and is still entitled to; a consented scope the user has since lost the entitlement to is dropped, and the consent to it is removed. `RESOURCE_OWNER`, `CLIENT_CREDENTIALS` and `HL7` clients never collect consent, so their refreshed tokens keep receiving the client's **Default Scopes** — every one of them for `CLIENT_CREDENTIALS` and `HL7`, and the ones the user is entitled to for `RESOURCE_OWNER`; a `CLIENT_CREDENTIALS` client bound to an AI Agent identity is created without refresh tokens, and its scopes are filtered by its service user's entitlements. From the second part of 2026.10.2 the scope IDs a token was issued with are recorded on the token, and a refresh returns exactly that recorded set; a token issued before the upgrade carries no recorded set and is refreshed by the rules above. Before 2026.10.2 every refresh returned the **Default Scopes** the user was entitled to whatever the flow, so a scope the user had declined on the consent page came back on the first refresh. A token issued for a `resource`, which is every MCP client's token, follows its own rule from 2026.11.1, below.

### Which scopes a token for a resource carries

From 2026.11.1, when an authorization names a `resource`, the token records every scope that the user has consented to for the client, still holds, and the resource accepts, whichever of them the request named, and the token response states that set in `scope` (RFC 6749 §5.1). A step-up that asks only for the scope the MCP server challenged for, such as `openiam:mcp:audit:read`, therefore adds it to the grant instead of replacing it, and the other tools keep working. Each refresh of such a token works the set out again the same way: it keeps a step-up taken since, drops a scope the user has given up or lost, gives a token that an earlier release recorded with the single step-up scope its other scopes back, and is refused with `invalid_grant` and `The user holds none of the scopes of the resource this token is for` once the user holds none of the resource's scopes.

<figure><img src="https://2965242200-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0uHWHRgcad6P03ehqgmX%2Fuploads%2Fgit-blob-d3a741d323f2b065a5476d01b167b2d0e4a45ef7%2Fmcp-step-up-token-scopes.png?alt=media" alt="A terminal: the token exchange for an authorization that asked for openiam:mcp:audit:read only, with the resource set to the MCP server, returns token_type Bearer, expires_in 3600, a refresh token and scope listing all four MCP scopes, access, audit, identity and workflow read; the token values are shown only by their length"><figcaption></figcaption></figure>

An authorization that names no `resource`, which covers every OAuth client that is not an MCP client, keeps the behavior above: the token records the held scopes the request named, the token response states no `scope`, and a refresh renews the recorded set.

Every scope resource other than the four MCP scopes ships public, and was re-set public as recently as 4.2.1.0, so **per-scope entitlement is not enforced in the shipped state** for the OpenID Connect claim scopes. Check the public flag on the scope resource before you design around it.

### The MCP scopes are non-public and role-granted

The four `openiam:mcp:*` scopes, added in 2026.10.2 for the MCP (Model Context Protocol) server, are the exception: they ship with the public flag **off**, so a user receives one only when entitled to the scope resource. That entitlement is the control over who may use the MCP server, and for what. It is an ordinary role-based access control (RBAC) resource entitlement, managed in Webconsole under **Access Control → Resources** and visible in the same reports and certification campaigns as every other entitlement. The migration grants the scopes to two roles by default:

| Scope                       | Covers                                                                           | Granted by default to          |
| --------------------------- | -------------------------------------------------------------------------------- | ------------------------------ |
| `openiam:mcp:identity:read` | who am I, users, managers and direct reports, organizations                      | End User, Super Security Admin |
| `openiam:mcp:access:read`   | the roles, groups and resources a user holds, access checks, the request catalog | End User, Super Security Admin |
| `openiam:mcp:workflow:read` | the caller's own requests, approvals and certifications                          | End User, Super Security Admin |
| `openiam:mcp:audit:read`    | audit log search                                                                 | Super Security Admin           |

To make the MCP server opt-in per role, remove the three End User grants and add the scopes to the roles that should have them. Do not set an MCP scope public: a public scope resource is granted to every user, and the control is gone. The grants are written by a database migration rather than through Webconsole, so the authorization graph has to be rebuilt once after upgrading, as described in [Rebuild the authorization graph](https://docs.openiam.com/administration-guide/operations/rebuild-the-authorization-graph.md); until then no user is entitled to an MCP scope, and the IdP issues none. The tools behind each scope are listed in [Decide who may use it](https://docs.openiam.com/administration-guide/federation/mcp-server.md#decide-who-may-use-it).

## Properties added in 2026.10.2

All of these live in the IdP's properties file, `idp.ui.properties` under the deployment's `conf/properties` directory, next to `org.openiam.oauth.token.info.public`; none has a row on **Administration → System Configuration**. The shipped file carries every key with the value below.

| Property                                                                        | Shipped value                        | What it does                                                                                                                                                                                         |
| ------------------------------------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `org.openiam.oauth.issuer`                                                      | empty                                | the tenant issuer; from 2026.11.2 its scheme and host also build every client issuer and every endpoint the discovery documents publish. Empty derives `https://<host>/idp/oauth2` from each request |
| `org.openiam.oauth.metadata.cache.seconds`                                      | `60`                                 | how long the tenant document holds the scope list before asking the backend again                                                                                                                    |
| `org.openiam.oauth.cimd.allowed.origins`                                        | `https://claude.ai`                  | origins whose `https` client ids are accepted as Client ID Metadata Documents; empty disables them                                                                                                   |
| `org.openiam.oauth.cimd.default.scopes`                                         | the four `openiam:mcp:*:read` scopes | scope names granted to a provisioned client                                                                                                                                                          |
| `org.openiam.oauth.cimd.token.expiration.seconds`                               | `3600`                               | access-token lifetime of a provisioned client                                                                                                                                                        |
| `org.openiam.oauth.cimd.cache.max.seconds`                                      | `86400`                              | longest a fetched document is reused                                                                                                                                                                 |
| `org.openiam.oauth.pkce.plain.allowed`                                          | `false`                              | whether a public client may use the `plain` PKCE transform                                                                                                                                           |
| `org.openiam.oauth.resources`                                                   | `mcp`                                | the configured resources for the `resource` parameter                                                                                                                                                |
| `org.openiam.oauth.resource.mcp.url`                                            | empty                                | the `mcp` resource's URL; empty derives `https://<host>/mcp`                                                                                                                                         |
| `org.openiam.oauth.resource.mcp.scopes`                                         | the four `openiam:mcp:*:read` scopes | the scopes the `mcp` resource accepts                                                                                                                                                                |
| `org.openiam.oauth.token.refresh.legacy.enabled`                                | `true`                               | whether the legacy `/token/refresh` endpoint, which authenticates no client, still answers; set it to `false` once every client refreshes through `/token`                                           |
| `org.openiam.oauth.cimd.agent.owner`                                            | empty                                | the user ID that owns and sponsors the AI Agent record created for every client that registers itself; while empty, such a client is refused at registration and the log names the property          |
| `org.openiam.oauth.cimd.agent.approval`                                         | `auto`                               | `auto` creates the record Active; `required` creates it Pending Approval, and the MCP server refuses the client until it is approved                                                                 |
| `org.openiam.oauth.cimd.agent.expiry.days`                                      | `365`                                | the record's expiry, counted from registration                                                                                                                                                       |
| `org.openiam.oauth.cimd.agent.environment`, `org.openiam.oauth.cimd.agent.risk` | `PROD`, `MEDIUM`                     | the record's environment and risk classification                                                                                                                                                     |
| `org.openiam.oauth.client_credentials.legacy.subject`                           | `true`                               | whether a `client_credentials` client with no agent record still receives the `0001` subject; the next release ships `false`                                                                         |

## Related

* [OAuth 2.0 and OpenID Connect](https://docs.openiam.com/administration-guide/federation/oauth-and-oidc.md) — the procedure these values configure
* [Govern AI agents as non-human identities](https://docs.openiam.com/administration-guide/federation/mcp-server/mcp-agents.md) — the agent record behind the `client_credentials` subject and the `cimd.agent` properties
* [Enumerated value reference](https://docs.openiam.com/administration-guide/reference/enums.md) — the OAuth constants as declared, alongside every other enumeration
* [System property reference](https://docs.openiam.com/administration-guide/reference/system-properties.md) — `org.openiam.authorization.oauth.disabled` and the rest of the `System` category


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/administration-guide/federation/oauth-and-oidc/oauth-and-oidc-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
