By email domain
Enable JIT provisioning by email domain to allow any user with a certain email domain (for example,@companyname.com) to log into a given Organization. Using the Update Organization endpoint, set:
email_jit_provisioningtoRESTRICTEDemail_allowed_domainsto an array of allowed email domains
Disallowed common email domains
Disallowed common email domains
Stytch disallows setting certain common email domains on the
email_allowed_domains array:gmailaolyahooicloudhotmailmsncomcastliveoutlookattearthlinkmemacsbcglobalverizonigmailheylapostewanadoogooglemailorangerediffmailuolbolfreegmxyandexymaillibero
OAuth step-up flow
If a user authenticates via OAuth, they will only be able to access an Organization via JIT Provisioning by email domain if the OAuth provider indicates active ownership of the email address. Otherwise, the user will be prompted to complete a step-up form of primary authentication before they can access the Organization. See here for additional information.By SSO Connection
Enable JIT Provisioning by SSO Connection to allow users to log into an Organization via their company’s Identity Provider, assuming an SSO Connection has been set up for that Organization and Identity Provider. For example, assume one of your customers sets up a Microsoft Entra SSO Connection. If JIT Provisioning is enabled for that SSO Connection, your customer’s team members will be able to log into the customer’s Stytch Organization without being explicitly added or invited, as long as the team members are assigned to your application within Microsoft Entra. To enable JIT Provisioning by SSO Connection:- Set
sso_jit_provisioningto either:ALL_ALLOWEDif you’d like to enable JIT Provisioning for all of the Organization’s active SSO ConnectionsRESTRICTEDif you’d like to specify which of the Organization’s SSO Connections should be enabled for JIT Provisioning
- If
RESTRICTED, specify which SSO Connections should be enabled for JIT Provisioning withsso_jit_provisioning_allowed_connections.
By OAuth tenant
Enable JIT Provisioning by OAuth tenant to allow users to log into an Organization based on their OAuth tenant membership (for example, if they belong to a specific Github Organization, Slack Workspace, or Hubspot Team).If you’re using Google or Microsoft OAuth, in most cases you can use JIT Provisioning by email domain instead.
- Set
oauth_tenant_jit_provisioningtoRESTRICTED. - Add the allowed OAuth tenants to
allowed_oauth_tenantsobject, where the available keys areslack,hubspot, andgithub, and the values are arrays of tenant identifiers (for example, Slack Team IDs).
Determining tenant IDs
Slack
Slack
Your Slack tenant ID (referred to as a Workspace ID by Slack) can be determined by following this guide.
HubSpot
HubSpot
Your HubSpot tenant ID (referred to as a Hub ID by HubSpot) can be determined by either:
- Logging into your HubSpot developer account and parsing it from the URL path. It will have the form
https://app.hubspot.com/developer/${TENANT_ID}. - When logged into your HubSpot developer account, clicking on the dropdown menu under your account name in the upper right-hand corner. It will be the sequence of numbers under your account name.
GitHub
GitHub
GitHub tenant IDs are taken from the internal ID of a GitHub organization. There are a number of ways to retrieve this value, depending on your permissions in relation to the GitHub organization and the organization’s privacy settings:
- You can query GitHub’s organization endpoint. The tenant ID will be the id value in the JSON response.
- If you are a member of the GitHub organization in question, it may be easier to use the GitHub CLI to request a list of the organizations you are a member of with the List organizations for the authenticated user endpoint.