provider Sso PUT /v1/b2b/sso/saml/{organization_id}/connections/{connection_id}
@utdk/stytch /v1/b2b/sso/saml/{organization_id}/connections/{connection_id}
Updateconnection
Updates an existing SAML connection. Note that a newly created connection will not become active until all of the following are provided: * `idp_sso_url` * `attribute_mapping` * `idp_entity_id` * `x509_certificate`
organization_id path required
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.
string
connection_id path required
Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
string
X-Stytch-Member-Session header
A Stytch session that can be used to run the request with the given member's permissions.
string
X-Stytch-Member-SessionJWT header
A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions.
string

Try it

Authentication
Configure credentials for Stytch API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

apiSsoV1SsoSamlUpdateconnection
PUT/v1/b2b/sso/saml/{organization_id}/connections/{connection_id}
Updates an existing SAML connection. Note that a newly created connection will not become active until all of the following are provided: * `idp_sso_url` * `attribute_mapping` * `idp_entity_id` * `x509_certificate`

Parameters

required

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.

required

Globally unique UUID that identifies a specific SSO `connection_id` for a Member.

Input

A globally unique name for the IdP. This will be provided by the IdP.

A human-readable display name for the connection.

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`.

A certificate that Stytch will use to verify the sign-in assertion sent by the IdP, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format. See our [X509 guide](https://stytch.com/docs/b2b/api/saml-certificates) for more info.

The URL for which assertions for login requests will be sent. This will be provided by the IdP.

All Members who log in with this SAML connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.

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](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. Before adding any group implicit role assignments, you must add a "groups" key to your SAML connection's `attribute_mapping`. Make sure that your IdP is configured to correctly send the group information.

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](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info.

A PKCS1 format RSA private key used for signing SAML requests. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported. When provided, Stytch will generate a new x509 certificate from this key and return it in the signing_certificates array.

The NameID format the SAML Connection expects to use. Defaults to `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`.

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](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info.

Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is enabled).

A PKCS1 format RSA private key used to decrypt encrypted SAML assertions. Only PKCS1 format (starting with "-----BEGIN RSA PRIVATE KEY-----") is supported.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stytch from '@utdk/stytch';

await stytch.apiSsoV1SsoSamlUpdateconnection()