The Get SSO Connections method wraps the Get SSO Connections API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method cannot be used to get SSO connections from other Organizations.
Get SSO Connections
Response fields
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.
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.
The list of SAML Connections owned by this organization.
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.
Globally unique UUID that identifies a specific SAML Connection.
A human-readable display name for the connection.
The URL of the Assertion Consumer Service. This value will be passed to the IdP to redirect the Member back to Stytch after a sign-in attempt. Read our SAML Overview for more info.
The URL of the Audience Restriction. This value will indicate that Stytch is the intended audience of an assertion. Read our SAML Overview for more info.
An object that represents the attributes used to identify a Member. This object will map the IdP-defined User attributes to Stytch-specific values. Required attributes: email and one of full_name or first_name and last_name.
The key that will be sent by the IdP to indicate the member's email. If your IdP is configured to have email as its Name ID format, you should use NameID for the value here.
The key that will be sent by the IdP to indicate the member's full name.
The key that will be sent by the IdP to indicate the member's group memberships. This field is required if you would like to use SAML group implicit role assignments.
The ID of the member in the IdP. This is optional, but recommended, as it provides us with a stable identifier that can be used to correctly identify the Member and log them into their existing account after an IdP-driven email update.
A globally unique name for the IdP. This will be provided by the IdP.
An alternative URL to use for the Audience Restriction. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Read our SSO migration guide for more info.
An alternative URL to use for the AssertionConsumerServiceURL in SP initiated SAML AuthNRequests. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Note that you will be responsible for proxying requests sent to the Alternative ACS URL to Stytch. Read our SSO migration guide for more info.
The NameID format the SAML Connection expects to use. Defaults to urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress.
The URL for which assertions for login requests will be sent. This will be provided by the IdP.
A list of X.509 certificates Stytch will use to sign its assertion requests. Certificates should be uploaded to the IdP.
The certificate, in PEM format.
A timestamp that indicates when the certificate was created.
A timestamp that indicates when the certificate was updated.
A timestamp that indicates when the certificate will expire.
The ID of the certificate.
The issuer of the certificate. For signing certificates, this value will be "Stytch".
A list of X.509 certificates Stytch will use to validate an assertion callback. Certificates should be populated from the IdP.
The certificate, in PEM format.
A timestamp that indicates when the certificate was created.
A timestamp that indicates when the certificate was updated.
A timestamp that indicates when the certificate will expire.
The ID of the certificate.
The issuer of the certificate. For signing certificates, this value will be "Stytch".
A list of encryption private keys Stytch will use to decrypt encrypted SAML assertions.
A PKCS1 format RSA private key used to decrypt encrypted SAML assertions. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported.
A timestamp that indicates when the certificate was created.
The ID of the encryption private key.
All Members who log in with this SAML connection will implicitly receive the specified Roles. See the RBAC guide for more information about role assignment.
The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.
Reserved role_ids that are predefined by Stytch include:
- stytch_member
- stytch_admin
Check out the guide on Stytch default Roles for a more detailed explanation.
Defines the names of the SAML groups that grant specific role assignments. For each group-Role pair, if a Member logs in with this SAML connection and belongs to the specified SAML group, they will be granted the associated Role. See the RBAC guide for more information about role assignment.
The name of the group that grants the specified role assignment.
The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.
Reserved role_ids that are predefined by Stytch include:
- stytch_member
- stytch_admin
Check out the guide on Stytch default Roles for a more detailed explanation.
Name of the IdP. Enum with possible values: classlink, cyberark, duo, google-workspace, jumpcloud, keycloak, miniorange, microsoft-entra, okta, onelogin, pingfederate, rippling, salesforce, shibboleth, or generic.
Specifying a known provider allows Stytch to handle any provider-specific logic.
Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is enabled).
The status of the connection. The possible values are pending or active. See the Update SAML Connection endpoint for more details.
The list of OIDC Connections owned by this organization.
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.
Globally unique UUID that identifies a specific OIDC Connection.
A human-readable display name for the connection.
The callback URL for this OIDC connection. This value will be passed to the IdP to redirect the Member back to Stytch after a sign-in attempt.
The status of the connection. The possible values are pending or active. See the Update OIDC Connection endpoint for more details.
A case-sensitive https:// URL that uniquely identifies the IdP. This will be provided by the IdP.
The OAuth2.0 client ID used to authenticate login attempts. This will be provided by the IdP.
The secret belonging to the OAuth2.0 client used to authenticate login attempts. This will be provided by the IdP.
The location of the URL that starts an OAuth login at the IdP. This will be provided by the IdP.
The location of the URL that issues OAuth2.0 access tokens and OIDC ID tokens. This will be provided by the IdP.
The location of the IDP's UserInfo Endpoint. This will be provided by the IdP.
The location of the IdP's JSON Web Key Set, used to verify credentials issued by the IdP. This will be provided by the IdP.
Name of the IdP. Enum with possible values: classlink, cyberark, duo, google-workspace, jumpcloud, keycloak, miniorange, microsoft-entra, okta, onelogin, pingfederate, rippling, salesforce, shibboleth, or generic.
Specifying a known provider allows Stytch to handle any provider-specific logic.
A space-separated list of custom scopes that will be requested on every SSOStart call. If set, this value will replace the default set of OIDC scopes requested: openid email profile. Additional scopes can be requested using the custom_scopes query parameter on individual SSOStart calls.
An object that represents the attributes used to identify a Member. This object will map the IdP-defined User attributes to Stytch-specific values, which will appear on the member's Trusted Metadata.
The list of External Connections owned by this organization.
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.
Globally unique UUID that identifies a specific External SSO Connection.
A human-readable display name for the connection.
Globally unique UUID that identifies a different Organization within your Project.
Globally unique UUID that identifies a specific SSO connection configured for a different Organization in your Project.
All Members who log in with this External connection will implicitly receive the specified Roles. See the RBAC guide for more information about role assignment. Implicit role assignments are not supported for External connections if the underlying SSO connection is an OIDC connection.
The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.
Reserved role_ids that are predefined by Stytch include:
- stytch_member
- stytch_admin
Check out the guide on Stytch default Roles for a more detailed explanation.
Defines the names of the groups that grant specific role assignments. For each group-Role pair, if a Member logs in with this external connection and belongs to the specified group, they will be granted the associated Role. See the RBAC guide for more information about role assignment.
The name of the group that grants the specified role assignment.
The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.
Reserved role_ids that are predefined by Stytch include:
- stytch_member
- stytch_admin
Check out the guide on Stytch default Roles for a more detailed explanation.
The status of the connection. External connections are always active.
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const GetSSOConnections = () => {
const stytch = useStytchB2BClient();
const getSSOConnections = () => {
stytch.sso.getConnections();
};
return (
<View>
<TouchableOpacity onPress={getSSOConnections}>
<Text>Get SSO Connections</Text>
</TouchableOpacity>
</View>
);
};{
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"status_code": 200,
"saml_connections": [{...}, {...}],
"oidc_connections": [{...}, {...}],
"external_connections": [{...}, {...}]
}{
"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"
}{
"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"
}{
"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"
}{
"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"
}