/
Contact usSee pricingStart building
    Introduction
    Overview
    Postman
    Organizations
      Organization object
      Create an organization
      Get an organization
      Update an organization
      Search for organizations
      Delete an organization
    Members
      Member object
      Create a Member
      Get a Member
      Get a Member (Dangerous)
      Update a Member
      Reactivate a Member
      Search for Members
      Unlink Retired Email
    • Delete

      • Delete a Member
        Delete Member password
        Delete Member MFA phone number
        Delete Member MFA TOTP
    RBAC
      Resource object
      Role object
      Scope object
      Get RBAC Policy
    Email magic links
    • Organization

      • Send login or signup email
        Send invite email
        Authenticate Magic Link
    • Discovery

      • Send discovery email
        Authenticate discovery Magic Link
    Email one-time passcodes (OTP)
    • Organization

      • Send login or signup OTP
        Authenticate OTP
    • Discovery

      • Send discovery OTP
        Authenticate discovery OTP
    OAuth
    • Discovery

      • Use Google for discovery
        Use Microsoft for discovery
        Use HubSpot for discovery
        Use Slack for discovery
        Use GitHub for discovery
        Authenticate discovery OAuth
    • Organization

      • Login with Google
        Login with Microsoft
        Login with HubSpot
        Login with Slack
        Login with GitHub
        Authenticate OAuth
    • Token

      • Get Google Access Token
        Get Microsoft Access Token
        Get HubSpot Access Token
        Get Slack Access Token
        Get GitHub Access Token
    Session management
      Session object
      Get JWKS
      Get Session
      Authenticate Session
      Exchange Session
      Revoke Session
      Migrate Session
    Single sign-on (SS0)
      SAML Connection object
      OIDC Connection object
      External Connection object
    • SAML

      • Create SAML Connection
        Update SAML Connection
        Update SAML Connection by Metadata URL
        Delete SAML Verification Certificate
    • OIDC

      • Create OIDC Connection
        Update OIDC Connection
        Get OIDC Access Token
    • External

      • Create External Connection
        Update External Connection
    • Shared

      • Get SSO Connections
        Delete SSO Connection
        Start SSO Authenticate
        Complete SSO Authenticate
    SCIM
      SCIM Connection Object
    • Connection management

      • Create SCIM Connection
        Update SCIM Connection
        Delete SCIM Connection
        Get SCIM Connection
    • Token management

      • Start SCIM Token Rotation
        Complete SCIM Token Rotation
        Cancel SCIM Token Rotation
    • SCIM groups

      • Get SCIM Connection Groups
    Discovery
      Discovered Organization object
      Create Organization via Discovery
      List Organizations
      Exchange Intermediate Session
    Passwords
      Authenticate
      Discovery Authenticate
      Strength check
      Migrate
    • Reset Options

      • Password reset by email start
        Password reset by email
        Password reset by existing password
        Password reset by session
        Discovery Password reset by email start
        Discovery Password reset by email
        Require Password reset by email
    Multi-Factor Authentication (MFA)
    • One-time passcodes

      • Send SMS OTP
        Authenticate SMS OTP
    • Time-based one-time passcodes

      • Create TOTP
        Authenticate TOTP
        Migrate TOTP
    • Recovery codes

      • Get recovery codes
        Recover
        Rotate recovery codes
    M2M Authentication
      M2M Client Object
    • TOKEN

      • Get Access Token
        Authenticate Access Token
    • M2M Client

      • Create M2M client
        Get M2M client
        Search M2M clients
        Update M2M client
        Delete M2M client
    • Rotate secret

      • Start secret rotation
        Rotate secret
        Cancel secret rotation
    Connected AppsBeta
      Get Access Token
    • Tokens

      • Connected App ID Token Object
        Connected App Access Token Object
    • Configuration

      • Get JWKS
        Get OpenID Configuration
    • Methods

      • Introspect Token
        Authenticate Access Token (Local)
        Exchange Access Token
        Revoke Token
        Get UserInfo
    Impersonation
      Authenticate Token
    Resources
      Organization authentication settings
      Common email domains
      Member states
      Email templates
      URL validation
      Metadata
      SAML overview
      SAML Certificates
    Errors
      Overview
      Error object
      400
      401
      403
      404
      405
      429
      499
      500
      503
Get support on SlackVisit our developer forum

Contact us

B2B Saas Authentication

/

API reference

/

Resources

/

Organization authentication settings

Organization authentication settings

Every Organization has a set of fields that control the authentication and provisioning of its Members. These controls have admin-like capabilities and should be updated deliberately.

The Organization auth settings are grouped by type of auth factor. The auth setting field names are prepended with an auth factor like email or sso or oauth. For example, all Organization fields that begin with email_* are settings that specifically affect provisioning and auth flows via Email Magic Links.

An Organization must always have at least one auth setting that allows new Members to be created and join. As a result, sso_jit_provisioning, email_jit_provisioning, email_invites cannot all be simultaneously set to NOT_ALLOWED.

Here is an example Organization object with its auth settings fully shown.

{
    "organization_name": "Example Org",
    "organization_slug": "example-org",
   
    // Auth settings for Email Magic Links
    "email_invites": "NOT_ALLOWED" | "RESTRICTED" | "ALL_ALLOWED",    
    "email_jit_provisioning": "NOT_ALLOWED" | "RESTRICTED",
    "email_allowed_domains": ["stytch.com"],

    // Auth settings for Single Sign On
    "sso_jit_provisioning": "NOT_ALLOWED" | "RESTRICTED" | "ALL_ALLOWED",
    "sso_default_connection_id": "...",
    "sso_jit_provisioning_allowed_connections": [
        "saml-connection-live-7111f7b1-9896-4ce3-a658-9e0707fc5192",
    ],
    "sso_active_connections": [
        { "connection_id": … },
        { "connection_id": … }      
    ]

  // Auth settings for Allowed Auth Methods
  "auth_methods": "RESTRICTED" | "ALL_ALLOWED",
  "allowed_auth_methods": ["sso", "magic_link", "password", "google_oauth", "microsoft_oauth"]

  // Auth settings for MFA
  "mfa_methods": "RESTRICTED" | "ALL_ALLOWED",
  "allowed_mfa_methods": ["sms_otp", "totp"]

    …
}

Auth settings for Email Magic Links:

  • If email_allowed_domains is empty
    • then email_invites cannot be set to RESTRICTED.
    • then email_jit_provisioning cannot be set to RESTRICTED.
  • If email_allowed_domains is not empty
    • and email_invites is set to RESTRICTED, then all new Members must have an email address that complies with email_allowed_domains in order to be invited by email.
    • and email_invites is set to ALL_ALLOWED, then any new Member can be invited to email.
    • and email_invites is set to NOT_ALLOWED, then email invites are disabled.
  • If email_allowed_domains is not empty
    • and email_jit_provisioning is set to RESTRICTED, then all new Members must have an email address that complies with email_allowed_domains in order to be provisioned via Email Magic Links.
    • and email_jit_provisioning is set to ALL_ALLOWED, then any new Member can be provisioned via Email Magic Links.
    • and email_jit_provisioning is set to NOT_ALLOWED, then JIT provisioning via Email Magic Links is disabled.
  • If email_allowed_domains is updated
    • then the entire list will be overwritten by the new value.
    • then all Members will remain active even if their email_address no longer complies with email_allowed_domains.
    • and either email_invites or email_jit_provisioning is set to RESTRICTED, then email_allowed_domains cannot be set to an empty array.

Auth settings for Single Sign On:

  • If sso_jit_provisioning_allowed_connections is empty
    • then sso_jit_provisioning cannot be set to RESTRICTED.
  • If sso_jit_provisioning_allowed_connections is not empty
    • and sso_jit_provisioning is set to RESTRICTED, then all new Members must have an SSO login that complies with sso_jit_provisioning_allowed_connections in order to be provisioned via SSO.
    • and sso_jit_provisioning is set to ALL_ALLOWED, then all new Members will be automatically provisioned via any of the Organization's sso_active_connections.
    • and sso_jit_provisioning is set to NOT_ALLOWED, then JIT provisioning via SSO is disabled.
  • If sso_jit_provisioning_allowed_connections is updated
    • then the entire list will be overwritten by the new value.
    • then all currently active Members will remain active even if their sso_registrations no longer complies with sso_jit_provisioning_allowed_connections.
    • and sso_jit_provisioning is set to RESTRICTED, then sso_jit_provisioning_allowed_connections cannot be set to an empty array.

Auth settings for Allowed Auth Methods:

  • If allowed_auth_methods is empty
    • then auth_methods cannot be set to RESTRICTED.
  • If allowed_auth_methods is not empty
    • and auth_methods is set to RESTRICTED, then all members looking to authenticate will be required to use one of these auth methods.
  • If allowed_auth_methods is updated
    • then the entire list will be overwritten by the new values.
    • then all currently active Members will remain active even if their auth methods no longer complies with allowed_auth_methods. However, the member will not be able to authenticate with the disallowed methods.
    • and auth_methods is set to RESTRICTED, then auth_methods cannot be set to an empty array.

Auth settings for Allowed MFA Methods:

  • If allowed_mfa_methods is empty
    • then mfa_methods cannot be set to RESTRICTED.
  • If allowed_mfa_methods is not empty
    • and mfa_methods is set to RESTRICTED, then all members looking to authenticate with MFA will be required to use one of these MFA methods.
  • If allowed_mfa_methods is updated
    • then the entire list will be overwritten by the new values.
    • then all currently active Members will remain active even if their MFA methods no longer complies with allowed_mfa_methods. However, the member will not be able to MFA authenticate with the disallowed methods.
    • and mfa_methods is set to RESTRICTED, then mfa_methods cannot be set to an empty array.