/
Contact usPricingLog in
    Overview
    iOS SDK reference
    Android SDK reference

    React Native SDK reference

    Installation
    Changelog
    Organizations
      Get Organization
      Get Organization by Slug
      Update Organization
      Delete Organization
    Members
      Get Member
      Create Member
      Update Member
      Search Members
      Delete Member
      Reactivate Member
      Delete Member Password
      Delete Member MFA Phone Number
      Delete Member MFA TOTP
      Unlink Retired Member Email
      Start Member Email Update
      Update Self
      Delete Self Password
      Delete Self MFA Phone Number
      Delete Self MFA TOTP
      Unlink Retired Self Email
      Start Self Email Update
      Update Member (Deprecated)
      Delete Member MFA Phone Number (Deprecated)
    RBAC
      Is Authorized
      Permissions
    Email Magic Links
      Login or Signup
      Invite
      Authenticate
      Send Discovery Email
      Authenticate Discovery Magic Link
    Session Management
      Get Session
      Authenticate Session
      Revoke Session
      Exchange Session
      Get Tokens
      Revoke Sessions for Member
    SSO
      Start SSO Flow
      Authenticate
      Get SSO Connections
      Delete SSO Connection
      Create SAML Connection
      Update SAML Connection
      Update SAML Connection by Metadata URL
      Delete Encryption Private Key
      Delete Verification Certificate
      Create OIDC Connection
      Update OIDC Connection
      Create External Connection
      Update External Connection
    Discovery
      List Discovered Organizations
      Create Organization via Discovery
      Exchange Intermediate Session
    Passwords
      Authenticate
      Reset by Email Start
      Reset by Email
      Reset by Existing Password
      Reset by Session
      Strength Check
    SCIM
      Create SCIM Connection
      Update SCIM Connection
      Delete SCIM Connection
      Get SCIM Connection
      Rotate SCIM Token Start
      Rotate SCIM Token Complete
      Rotate SCIM Token Cancel
    Multi-factor Authentication
    • One-Time Passcodes

      • SMS Send
        SMS Authenticate
    • Time-Based One-Time Passcodes

      • TOTP Create
        TOTP Authenticate
    • Recovery Codes

      • Recovery Codes Recover
        Rotate Recovery Codes
        Get Recovery Codes
    Pre-built UI
      UI Configuration
    Device Fingerprinting
      Get telemetry ID
    More Resources
      SWR & caching
      Deep linking
      Android KeyStore considerations
Get support on SlackVisit our developer forum

Contact us

B2B SaaS Authentication

/

Mobile SDKs

/

React Native SDK reference

/

SCIM

/

Rotate SCIM Token Complete

SCIM Rotate Token Complete

The SCIM Rotate Token Complete method wraps the SCIM Rotate Token Complete API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to complete token rotations for SCIM connections in other Organizations.

Authenticated Method

This method requires valid Session for a Member with permission to perform the update Action on the stytch.scim Resource.

Before using this method, enable Member actions & organization modifications in the Frontend SDK page. To learn more, see our RBAC guide.


Method parameters


connection_id* string

The ID of the SCIM connection.


Response fields


request_id string

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.


status_code int

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.


connection object

The SCIM Connection Object.

organization_id string

Globally unique UUID that identifies a specific Organization. The organization_id is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience.

connection_id string

The ID of the SCIM connection.

status string

The status of the connection. The possible values are deleted or active.

display_name string

A human-readable display name for the connection.

identity_provider string

Name of the IdP. Enum with possible values: okta, microsoft-entra, cyberark, jumpcloud, onelogin, pingfederate, rippling or generic.

Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending ?aadOptscim062020 to the returned BaseURL for microsoft-entra SCIM Connections to enable the SCIM 2.0 compliant flag.

base_url string

The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API endpoints

bearer_token string

The token supplied to the Identity Provider (IdP) alongside the base URL that grants access to Stytch's SCIM API endpoints. It should be included in HTTP authorization headers. This field is supplied only on creation of the SCIM connection.

bearer_token_expires_at timestamp

The bearer token expiry time.

bearer_token_last_four string

The last four digits of the bearer token. If you've lost access to your bearer_token and need to generate a new one, use the SCIM rotate token start endpoint.

next_bearer_token string

This field is supplied only during token rotation. This token should be used as the new bearer token for the SCIM connection after token rotation has been completed using the SCIM rotate token complete endpoint.

next_bearer_token_expires_at timestamp

This field is supplied only during token rotation. The next bearer token expiry time.

scim_group_implicit_role_assignments array[objects]

An array of SCIM group implicit role assignments. Each object in the array must contain a group_id and a role_id.

group_id string

The ID of the group.

role_id string

The ID of the role.

import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';

export const RotateSCIMTokenComplete = () => {
  const stytch = useStytchB2BClient();

  const rotateSCIMTokenComplete = () => {
    stytch.scim.rotateComplete('scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc');
  };

  return (
    <View>
      <TouchableOpacity onPress={rotateSCIMTokenComplete}>
        <Text>Complete SCIM Token Rotation</Text>
      </TouchableOpacity>
    </View>
  );
};
RESPONSE 200
200
​
{
  "connection": {
      "organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931"
      "connection_id": "scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc"
      "status": "active",
      "display_name": "My SCIM Connection"
      "identity_provider": "okta"
      "base_url": "https://test.stytch.com/v1/b2b/scim/scim-connection-test-cdd5415a-c470-42be-8369-5c90cf7762dc"
      "bearer_token_expires_at": "2029-03-20T21:28:28Z"
      "bearer_token_last_four": "sdko"
  },
}
RESPONSE 401
200
​
{
  "status_code": 401,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "unauthorized_credentials",
  "error_message": "Unauthorized credentials.",
  "error_url": "https://stytch.com/docs/api/errors/401"
}
RESPONSE 403
200
​
{
  "status_code": 403,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "session_authorization_error",
  "error_message": "The Member is not authorized to perform the requested action on that resource.",
  "error_url": "https://stytch.com/docs/api/errors/403"
}
RESPONSE 429
200
​
{
  "status_code": 429,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "too_many_requests",
  "error_message": "Too many requests have been made.",
  "error_url": "https://stytch.com/docs/api/errors/429"
}
RESPONSE 500
200
​
{
  "status_code": 500,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "error_type": "internal_server_error",
  "error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
  "error_url": "https://stytch.com/docs/api/errors/500"
}