API ReferenceManagementScim Management
POST
/v1/mgmt/scim/key/create

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

tenantId?string
ssoId?string

The SSO configuration this key provisions into. Omit it to target the tenant's default configuration - it does NOT mean "every configuration".

name?string

Defaults to a name derived from the tenant and SSO configuration.

description?string
expireTime?string

Epoch seconds. 0, the default, means the key never expires. An expired SCIM key stops the identity provider from provisioning, so prefer 0 unless you have a rotation process.

Create a SCIM access key for a tenant, using a valid management key. The key is scoped to the given tenant and carries the roles and custom claims SCIM requires, so the returned bearer token can be pasted straight into an identity provider's SCIM configuration. Existing SCIM keys for the same SSO configuration stay valid. The cleartext is returned exactly once.

curl -X POST "https://api.descope.com/v1/mgmt/scim/key/create" \  -H "Content-Type: application/json" \  -d '{}'
{  "cleartext": "string",  "key": {    "id": "string",    "name": "string",    "roleNames": [      "string"    ],    "keyTenants": [      {        "tenantId": "string",        "roleNames": [          "string"        ],        "tenantName": "string"      }    ],    "status": "string",    "createdTime": 0,    "expireTime": 0,    "createdBy": "string",    "clientId": "string",    "boundUserId": "string",    "customClaims": {      "claim-name": "claim-value"    },    "editable": true,    "description": "string",    "permittedIps": [      "string"    ],    "customAttributes": {      "attribute-key": "attribute-value"    }  },  "scimUrl": "string",  "revokedKeyIds": [    "string"  ]}
export interface Response {/** * The bearer token to configure in the identity provider, in "<projectId>:<key>" form. *  Returned exactly once. */cleartext?: stringkey?: {id?: stringname?: stringroleNames?: string[]keyTenants?: AssociatedTenantAK[]status?: stringcreatedTime?: numberexpireTime?: numbercreatedBy?: stringclientId?: stringboundUserId?: string/** * Custom claims to include in the JWT as key-value pairs. Keys must be strings; values can be strings, numbers, or booleans. */customClaims?: {[k: string]: string}editable?: booleandescription?: stringpermittedIps?: string[]/** * Custom attributes as key-value pairs. Keys must be strings; values can be strings, numbers, booleans, or arrays. */customAttributes?: {[k: string]: string}}/** * The SCIM base URL to configure in the identity provider alongside the bearer token. */scimUrl?: string/** * The keys revoked by this call, if any. */revokedKeyIds?: string[]}export interface AssociatedTenantAK {tenantId?: stringroleNames?: string[]tenantName?: string}
Was this helpful?