## Frontegg as IDP via SAML Using Frontegg as an Identity Provider (IdP) through SAML lets organizations delegate authentication to a trusted identity provider (IdP), ensuring secure and efficient access. To connect third-party applications to your Frontegg Hosted Login via SAML, follow the steps below to configure your Frontegg environment as an IdP for a third-party service. Prerequisites This capability is fully supported via **Frontegg Hosted Login**. If you are using Frontegg's embedded login, then Social and SSO login methods **will not** redirect the end user to the 3rd party application out of the box. ### Common Use Cases You may be wondering about common use cases that require configuring Frontegg as a SAML IdP. Some examples include: - **Support tools** (e.g., Zendesk): Enable users to share the same identity with the support tool. - **Documentation platforms** (e.g., readme.io or similar): Allow users to use the same identity credentials with that platform. In such cases, the flow will resemble the following: br ![saml](/assets/saml-idp.9d5eda20a434911778bb41ba8229c6484a5df55a396f7dc1a8dc791723cc2ce7.7e3aa641.png) ### Set Up Frontegg as an IDP via SAML 1. Go to the **Identity Provider** section under [ENVIRONMENT] → **Authentication** → **SSO** → **Identity Provider** → **SAML Applications** and click on **Add New Application**: br ![saml](/assets/add-new-saml.cfd151cfd4d138903176decad05a270b3ffc804fb35471485880efbbeef34ddb.7e3aa641.png) br 1. **Register the Service Provider**: For example, Zendesk, on Frontegg’s side. Insert the **Entity ID** and **ACS URL** in the dedicated fields. Ensure these values are also added to the **Hosted login authorized redirect URLs** after completing the setup here: br ![saml](/assets/saml-app-new.39cfae6ee6c1e2d4cda63a03c786e07d815b6455612df1e100869e729a141e0e.7e3aa641.png) 1. **Logout URL** (optional): You can optionally add a Logout URL to specify where the user will be redirected after initiating logout from the third-party service. 2. **User Attributes**: You can transfer user-related attributes from Frontegg to the Service Provider by selecting from a list of available attributes. ![saml](/assets/saml-attr-idp.a41f7a4360a6dd73c2a866f48f4f38432ce5bb7a91c1ca4508b10071ed73beb5.7e3aa641.png) After clicking **Next**, you will see the SSO endpoint and the Frontegg (IdP) certificate. Enter these details into the appropriate fields in your Service Provider (Zendesk). Note that some providers might not accept public certificates, in which case you can use the **SHA-256 fingerprint** as an alternative. ![saml](/assets/new-saml-app.4eaf33bee5a671bcaa9f5b04cc1983884faff02d7f7afaf9a5f2a6b25a8a9ccb.7e3aa641.png) Custom Domain If you have a custom domain set up for an environment, the SSO endpoint will be automatically generated using this domain. ### Creating SAML Configuration via API To create a SAML configuration programmatically, you will first need to authenticate your environment via [this endpoint](/ciam/api/vendor-service/other/authenticate_vendor). br ```js curl --location --request POST 'https://api.frontegg.com/oauth/resources/configurations/saml/v1/[URL-ENCODED-ENTITY-ID]' \ --header 'Authorization: Bearer [token]' \ --header 'Content-Type: application/json' \ --data-raw '{ "acsUrl": "[ACS-URL-FROM-SP]", "entityId": "[ENTITY-ID-FROM-SP]", "attributes": [ {"name":"name","value":"name"}, {"name":"email","value":"email"} ] }' ``` br The request will return XML metadata to use for the SAML configuration on the service provider configuration: br ```js [THE-PUBLIC-CERTIFICATE] [THE-PUBLIC-CERTIFICATE] urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress ``` br Some service providers may require inserting Identity Provider Entity ID, which is always `http://frontegg.com/saml`.