Skip to main content

Claims & Scopes

Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

A scope is what a client asks for. A claim is what Choreo Identity & Access Management returns. The mapping between the two is what controls which user attributes end up in your ID Token and your UserInfo response.

Choreo Identity & Access Management implements three layers:

  1. Standard OIDC scopes (OIDC Core §5.4): openid, profile, email, phone, address, with fixed claim sets defined by the spec. A client created without a mapping of its own starts with these.
  2. Application-defined scope-to-claim mappings (scopeClaims): request a scope, get a configurable bundle of claims. The mapping is the single authority on which OIDC scopes a client can obtain, and on the user attributes each one exposes.
  3. The claims request parameter (OIDC Core §5.5): request specific claims directly, claim-by-claim.

Standard OIDC Scopes​

ScopeClaims returned
openidsub (always included on any OIDC request)
profilename, family_name, given_name, middle_name, nickname, preferred_username, profile, picture, website, gender, birthdate, zoneinfo, locale, updated_at
emailemail, email_verified
phonephone_number, phone_number_verified
addressaddress (structured JSON object)

The actual values come from the authenticated user's attributes. Claims are omitted when the user has no value for them. email_verified and the other _verified claims follow Verified Contact Claims.

These defaults are written into a client's scopeClaims mapping at creation when it declares no mapping of its own, and they remain the fallback at runtime: a standard scope the mapping does not define still returns the claims listed above. Edit an entry to change what the scope returns, or map it to an empty list to stop it returning anything.

openid is the exception: it carries no user attributes of its own, its sub comes from the token subject, and it is always granted. It needs no mapping entry.

The attributes a mapping can reference come from the schemas of the client's allowed user types, plus the runtime-computed groups, roles, ouId, ouName, ouHandle, userTypeHandle, and userTypeName, and <attribute>_verified for each top-level attribute of type email or mobile. The userTypeHandle claim carries the handle of the user's type (for example, person), and userTypeName carries its display name (for example, Person). Anything else is removed when the client is saved. A client with no allowed user types has no schema to draw on, so the scopes it is seeded with start empty: the scope names are there, but no attributes are mapped to them until user types are configured. A mapping you send yourself is still stored as sent.

Verified Contact Claims​

For each top-level user attribute of type email or mobile, a client can release <attribute>_verified: true when the user verified the value released beside it, false otherwise. Users verify a contact through a self flow, see Email Address and Mobile Number Verification.

Map the claim to a scope beside its attribute:

{
"scopeClaims": {
"email": ["email", "email_verified"],
"phone": ["mobile_number", "mobile_number_verified"]
}
}

A user who verified their email address but not their mobile number then receives:

{
"email": "[email protected]",
"email_verified": true,
"mobile_number": "+94771234567",
"mobile_number_verified": false
}
BehaviorDetail
Released without its attributeNo, listing email_verified without email releases neither claim
Attribute value set by a flow or a federated identity providerNot counted, only a recorded verification counts

A user type can define the claim itself. When the user type's schema defines email_verified, for example to store a federated identity provider's value, Choreo Identity & Access Management uses ordinary attribute resolution for that name instead of the server-computed verification status.

Values are read at sign-in. Like every other user attribute, the claim keeps its sign-in value in refreshed tokens and in the UserInfo response. A verification or a contact change after sign-in appears after the user signs in again.

The default phone scope uses phone_number. The default Person user type stores its number as mobile_number, so map mobile_number and mobile_number_verified to a scope, as in the example above.

Custom Scope-to-Claim Mapping (scopeClaims)​

Each application can define its own scope-to-claim bundles. Asking for the scope returns the listed claims in both the ID Token and the UserInfo response.

{
"scopeClaims": {
"profile": ["given_name", "family_name", "picture"],
"email": ["email", "email_verified"],
"roles": ["roles", "groups"]
}
}
BehaviorDetail
Replaces the standard mappingYes, profile here returns only the three listed claims, not the full OIDC profile set
Custom scope namesAllowed, roles here is an application-defined scope
Standard scope not in scopeClaimsGranted on its standard claims, the built-in mapping is the fallback
Custom scope not in scopeClaimsNot granted, there is no fallback to inherit
Bypasses resource-server filteringYes, see "Filtering rules" below

A standard scope cannot be switched off by removing it. Deleting profile from the mapping returns it to the standard claim set, it does not stop the client granting it. To stop a standard scope releasing anything, map it to an empty list ("profile": []), which is honored as sent.

Create and update differ. On create, omitting scopeClaims seeds the standard scopes, while sending one stores exactly what you sent, so {"profile": [...]} yields a client whose stored mapping is only profile. On update the mapping is replaced by what you send, and omitting the field clears it. In both cases the standard scopes remain available at runtime through the fallback.

Declarative resource files are never seeded. A client loaded from a file under the declarative resources directory is stored exactly as written, so its mapping stays empty until you declare one. The runtime fallback still applies, so the standard scopes work as documented above; declare a mapping only where you want to narrow one.

Attribute lists follow the mapping. On create, token.idToken.userAttributes is derived from the mapping only when you omit it; send a list and it is stored as sent. userInfo.userAttributes inherits the ID token list when you omit it, so both end up covering the mapping by default. The list is a second gate: a claim reaches a token only when the scope releases it and the list allows it. So a client created with a narrow mapping has a correspondingly narrow list, and the standard claims a fallback scope resolves to are filtered out until you add them to the list. In the Console, mapping an attribute to a scope adds it to both lists for you; the lists themselves sit under Token Attributes (Advanced), where they exist for attributes you want reachable through the claims request parameter without tying them to a scope.

claims Request Parameter​

Sometimes you want exactly one claim, not a whole scope's bundle. Pass a JSON object on the authorization request:

GET /oauth2/authorize
?response_type=code
&client_id=$CLIENT_ID
&scope=openid
&claims={"id_token":{"email":{"essential":true}},"userinfo":{"phone_number":null}}
Sub-objectTargets
claims.id_tokenClaims to include in the ID Token
claims.userinfoClaims to include in the UserInfo response

Inside each sub-object, claim names map to either null (request without constraint) or an object such as { "essential": true } (request and mark as required).

Choreo Identity & Access Management advertises claims_parameter_supported: true in Server Metadata.

Filtering Rules​

How the request-time scope list becomes the issued-token scope list:

Scope categoryFiltered by resource indicators?Notes
openid, profile, email, phone, address❌ Not by resource indicatorsOpenID Connect standard scopes are reserved. Choreo Identity & Access Management keeps only the ones the application's scopeClaims mapping defines, plus openid, which is always granted.
Custom scopes covered by scopeClaims❌ Not by resource indicatorsThe application owns these scopes.
Permissions owned by a targeted resource server (see Resource Indicators)✅ KeptRS-defined
Permissions owned by a different resource server❌ Dropped silentlyRS-defined
Permissions not allowed on the application❌ RejectedRequest fails with invalid_scope

Try It in Choreo Identity & Access Management​

  1. Open Applications or Agents in the Choreo Identity & Access Management Console and select your client.
  2. Open the Token tab to add or remove scopes and to map the user attributes each one exposes. Mapping an attribute allow-lists it for the ID Token and UserInfo automatically, so there is nothing else to configure.
  3. Save.
Deploy your changes

Saving a change does not make it live. You author in the control plane, and your users sign in on a separate data plane, so a change takes effect in an environment only after you deploy it. Go to Deploy, deploy the latest version to your first environment, then promote it to the next environment when you are ready.

Auto-sync deploys saved changes to your first environment within seconds. Turning it on is your choice, per project. See Deploy a Version, or learn why you deploy and how auto-sync works.

  • OpenID Connect, the spec that defines standard scopes and the claims parameter
  • UserInfo, receives the same claim set as the ID Token
  • Resource Indicators, how scopes are filtered by targeted resource servers
  • Token Formats, userAttributes selection on access and ID tokens

Was this page helpful?