Dynamic app token TTL & invite org roles

Configure refresh token lifetimes for dynamic apps (CIMD) and assign per-organization roles directly in one-time token invitations.

Two updates are now live for OAuth dynamic applications and organization invitation flows: configurable refresh token lifetimes for dynamic apps (CIMD / MCP clients) and per-organization role assignment in one-time tokens.

Configurable refresh token lifetime for dynamic apps

Dynamic app clients using Client ID Metadata Documents (CIMD) previously always used the default 14-day refresh token lifetime.

  • Configurable TTL (1–180 days): Set Refresh token time to live (TTL) in days under Applications > Third-party apps > Dynamic app > Settings (Refresh token card), or via PATCH /api/configs/cimd with refreshTokenTtlInDays. Changes apply to the next refresh token issued across all dynamic app clients.
  • Fixed lifetime across rotations: Every dynamic app refresh token rotation preserves the original expiration timestamp, regardless of the application_type or token endpoint auth method declared in the client's metadata document. Dynamic clients that previously received a renewed TTL on each refresh now require users to re-authorize once the configured lifetime expires.

Per-organization role assignment in one-time tokens

POST /api/one-time-tokens now supports an optional context.jitOrganizationRoles array alongside context.jitOrganizationIds, allowing you to invite users into organizations with specific roles—such as an admin role—in a single magic link without follow-up webhooks or Management API calls.

{
  "email": "[email protected]",
  "context": {
    "jitOrganizationIds": ["org-id"],
    "jitOrganizationRoles": [
      {
        "organizationId": "org-id",
        "organizationRoleIds": ["organization-role-id"]
      }
    ]
  }
}
  • Replaces default JIT roles per organization: Each entry overrides the default JIT roles for that organization on both sign-in and registration (passing an empty organizationRoleIds array assigns no roles). Organizations in jitOrganizationIds without an entry keep their default JIT roles.
  • Additive for existing members: If the user is already a member of the organization, the specified roles are added while keeping their existing roles.
  • Upfront validation & resilient provisioning: POST /api/one-time-tokens returns 400 (request.invalid_input) if an organization ID is missing or not listed in jitOrganizationIds, appears more than once in jitOrganizationRoles, or references a role ID that is not a user organization role. Roles deleted after token creation are safely skipped at sign-in time.

Documentation