# OneLogin

> Connect using the SAML Custom Connector (Advanced).

Source: https://diakrin.com/docs/sso/onelogin

A OneLogin administrator connects OneLogin to Diakrin with **SAML Custom Connector (Advanced)**, previously called SAML Test Connector (Advanced). Have your [setup packet](/docs/sso#get-your-setup-packet) ready.

## Create the application

1. In OneLogin administration, add **SAML Custom Connector (Advanced)** and name it **Diakrin**.
2. Open **Configuration** and enter the values below.
3. Set **SAML nameID format** to **Persistent** and the NameID value (SAML NameID) to the **OneLogin ID**.
4. Under **Parameters**, add the work email as a SAML attribute named `email`.
5. Assign the pilot users or group and review your MFA policy.

## Map the fields

| OneLogin field | Value |
| --- | --- |
| Audience (EntityID) | `urn:amazon:cognito:sp:<poolId>` from the setup packet |
| Recipient | `https://auth.diakrin.com/saml2/idpresponse` |
| ACS (Consumer) URL | `https://auth.diakrin.com/saml2/idpresponse` |
| ACS (Consumer) URL Validator | The exact ACS URL, escaped and anchored with `^` and `$` |
| Login URL | `https://app.diakrin.com` |
| SAML initiator | Service Provider |
| SAML nameID format | Persistent, from the OneLogin ID |
| Parameter `email` | Work email |

Do not use a wildcard ACS validator or an email as the NameID. To use OIDC instead, use the issuer `https://<subdomain>.onelogin.com/oidc/2` with [Connect with OIDC](/docs/sso#connect-with-oidc).

## Activate and test

Export the identity-provider SAML metadata. In **Settings → Sign-in → SSO identity provider**, paste the metadata URL or upload the XML, then select **Verify and connect**. Leave Single Logout unconfigured; this flow does not guarantee global logout. After activation, follow [Test and roll out SSO](/docs/sso/testing).

## If it fails

| Symptom | Cause | Fix |
| --- | --- | --- |
| OneLogin rejects the ACS URL | The validator does not match | Anchor the exact escaped ACS URL with `^` and `$` |
| OneLogin succeeds but Diakrin refuses | The person is not a member of your organization yet | See [Sign in and join your team](/docs/sso#sign-in-and-join-your-team) |

Official reference: [Advanced SAML Custom Connector](https://onelogin.service-now.com/kb?id=kb_article_view&sysparm_article=KB0011004).
