Skip to content

Create a federated claim

Request

OAuth 2.0 scope:
  • okta.apps.manage

Creates a claim that will be included in tokens produced by federation protocols (for example: OIDC id_tokens or SAML Assertions)

Path
appIdstringrequired

Application ID

Example:0oafxqCAJWWGELFTYASJ
Bodyapplication/jsonrequired
expressionstring

The Okta Expression Language expression to be evaluated at runtime

Example:"appuser.entitlements.role"
namestring

The name of the claim to be used in the produced token

Example:"role"
curl -i -X POST \
  https://subdomain.okta.com/api/v1/apps/0oafxqCAJWWGELFTYASJ/federated-claims \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "role",
    "expression": "appuser.entitlements.role"
  }'

Responses

Created

Bodyapplication/json
createdstringread-only

Timestamp when the federated claim was created

Example:"2024-02-29T20:08:24.000Z"
expressionstring

The Okta Expression Language expression to be evaluated at runtime

Example:"appuser.entitlements.role"
idstringread-only

The unique ID of the federated claim

Example:"ofc2f4zrZbs8nUa7p0g4"
lastUpdatedstringread-only

Timestamp when the federated claim was updated

Example:"2023-02-21T20:08:24.000Z"
namestring

The name of the claim to be used in the produced token

Example:"roleg"
Response
{ "id": "ofc893fbjaBaqdtoX0g7", "name": "role", "expression": "appuser.entitlements.role", "created": "2024-12-25T03:00:00.000Z", "lastUpdated": "2024-12-25T03:00:00.000Z" }