Examplary
Start for free
All guides

Examplary for organizations

Connecting a SAML identity provider

Last updated on

To sign people in to Examplary over SAML 2.0, your IT admin adds Examplary as an application in your identity provider, and a workspace admin gives Examplary the provider's metadata. This guide has the steps for Microsoft Entra ID, Okta, ADFS, Shibboleth and Google Workspace. Any other SAML 2.0 provider works the same way.

Available plans

Single sign-on is available on the Organization plan. The Examplary side is set up by an admin or owner, under Account settings → Sign-in & domains.

The four steps, for every provider

  1. Add Examplary to your identity provider. In Examplary, choose SAML identity provider under Single sign-on. It shows the Entity ID (audience), the Assertion consumer service (reply) URL and the Metadata URL, each with a copy button. They're unique to your workspace, so copy them from your own screen.
  2. Send the email address. Examplary needs each person's email address to sign them in. First name, last name, role and groups are optional.
  3. Give Examplary your provider's metadata. Paste its metadata URL under Your identity provider's metadata URL and click Fetch. Examplary fetches it again every night, so it picks up a new certificate on its own. The URL has to start with https://, be reachable from the internet and describe only your provider, not a whole federation. Without such a URL, use Upload a metadata file, or enter the values by hand.
  4. Save, then test. Click Save sign-in method, then Test sign-in. The pop-up shows what your provider sent, without signing anyone in. Only then switch on Require everyone to sign in this way, if you want to.

Setting up single sign-on explains the Examplary side in more detail, including what happens to existing accounts.

What Examplary expects

SettingWhat to choose
BindingHTTP-Redirect to your provider, HTTP-POST back to Examplary
SigningSign the response, the assertion or both, with SHA-256 or stronger. SHA-1 is refused
Name IDPersistent or email. With a transient Name ID, also send a stable user ID attribute
Assertion encryptionOff. Examplary doesn't accept encrypted assertions
Signed requestsExamplary doesn't sign its requests, so don't require it
Single logoutNot supported. Leave it empty
Starting from a portalOnly when the admin switches on Allow signing in from the identity provider's portal

The role attribute takes the same values as everywhere else in Examplary: admin or manager for admins, teacher, staff or employee for teachers, and student, member or participant for students, in any case. The role is set when someone's account is created. Only the first value of the role attribute counts. Groups are created by name, and people are added to their groups every time they sign in. Taking someone out of a group is done in Examplary.

Microsoft Entra ID

  1. In the Microsoft Entra admin center, go to Enterprise applications → New application → Create your own application, and choose to integrate an application you don't find in the gallery.
  2. Open Single sign-on and choose SAML. Under Basic SAML Configuration, set Identifier (Entity ID) to Examplary's entity ID and Reply URL to Examplary's reply URL. Leave Sign on URL and Relay State empty.
  3. Under Attributes & Claims, the default email address, given name and surname claims are what Examplary reads. For groups, choose Add a group claim, then Groups assigned to the application, with Cloud-only group display names as the source. Without that, Entra sends group IDs, which turn into groups named after the ID. For roles, add app roles to the application and assign them.
  4. Under SAML Certificates, copy the App Federation Metadata Url into Examplary and click Fetch.
  5. Under Users and groups, assign the people or groups who may sign in.

Entra sends at most 150 groups per sign-in. Someone in more groups than that gets none from Entra.

Okta

  1. In the Okta Admin Console, go to Applications → Create App Integration and choose SAML 2.0.
  2. Set Single sign-on URL to Examplary's reply URL, and keep the option to use it for the recipient and destination URL ticked. Set Audience URI (SP Entity ID) to Examplary's entity ID, Name ID format to EmailAddress and Application username to Email.
  3. Under Attribute Statements, map email to user.email, firstName to user.firstName and lastName to user.lastName. Under Group Attribute Statements, add groups with a filter that matches the groups you want to send.
  4. Finish, open the Sign On tab and copy the Metadata URL into Examplary.
  5. Under Assignments, assign the people or groups who may sign in.

To let people start from the Okta dashboard, switch on Allow signing in from the identity provider's portal in Examplary as well.

ADFS

  1. In AD FS Management, go to Relying Party Trusts → Add Relying Party Trust and choose Claims aware.
  2. Choose to import data about the relying party published online, with Examplary's metadata URL.
  3. Pick an access control policy and finish. Then open Edit Claim Issuance Policy and add two rules:
    • Send LDAP Attributes as Claims, from Active Directory: E-Mail-Addresses to E-Mail Address, Given-Name to Given Name, Surname to Surname, and Token-Groups - Unqualified Names to Group.
    • Transform an Incoming Claim: E-Mail Address to Name ID, with the Email format.
  4. In the trust's properties, on the Advanced tab, check that the secure hash algorithm is SHA-256.
  5. Give Examplary your federation metadata: https://<your ADFS server>/FederationMetadata/2007-06/FederationMetadata.xml. If your ADFS server can't be reached from the internet, open that address yourself, save the file and use Upload a metadata file.

Shibboleth

These steps are for Shibboleth IdP version 4 and 5.

  1. Load Examplary's metadata in conf/metadata-providers.xml:

    <MetadataProvider id="Examplary" xsi:type="FileBackedHTTPMetadataProvider"
        metadataURL="(Examplary's metadata URL)"
        backingFile="%{idp.home}/metadata/examplary.xml" />
  2. In conf/attribute-filter.xml, release these attributes to Examplary's entity ID: mail, givenName, sn, displayName, eduPersonPrincipalName, eduPersonPrimaryAffiliation and isMemberOf. The default urn:oid: names are what Examplary reads. With a transient Name ID, eduPersonPrincipalName keeps people's accounts the same from one sign-in to the next. Use eduPersonPrimaryAffiliation for the role rather than eduPersonAffiliation: Examplary only reads the first value, and member makes someone a student.

  3. Give Examplary your IdP's metadata URL, usually https://<your IdP server>/idp/shibboleth.

Shibboleth often signs with a long-lived certificate of its own. Examplary refuses a certificate past its end date, unless the admin switches on Accept expired certificates.

Google Workspace

  1. In the Google Admin console, go to Apps → Web and mobile apps → Add app → Add custom SAML app.
  2. On the Google Identity Provider details page, download the IdP metadata. Upload it in Examplary with Upload a metadata file: Google doesn't publish a metadata URL.
  3. Under Service provider details, fill in Examplary's reply URL as the ACS URL and its entity ID as the Entity ID. Set Name ID format to EMAIL and Name ID to the primary email.
  4. Under Attribute mapping, map the primary email to email, the first name to firstName and the last name to lastName. Under Group membership, pick the groups to send as groups.
  5. Under User access, switch the app on for everyone, or for the right organizational units.

Google's certificate lasts five years. When it's replaced, download the metadata again and upload it in Examplary.

Change certificates without downtime

With a metadata URL, add the new certificate in your provider and make it active. Then click Fetch and Save sign-in method in Examplary, so it's used straight away. Otherwise Examplary picks it up during the night, and sign-ins fail until then.

With a metadata file or certificates entered by hand, add the new certificate to Signing certificates in Examplary first, next to the old one. Then switch your provider over, and remove the old certificate once it's no longer used. Each certificate shows its end date, and Expired once it's past it.

Troubleshooting

The test says the sign-in was refused. The reason is below it. An audience mismatch means the entity ID in your provider isn't Examplary's. A signature error usually means the certificate in Examplary isn't the one your provider signs with, or your provider signs with SHA-1.

The test says the identity provider sent no email address. Add an email attribute, or set the Name ID format to email. Without an email address, nobody can sign in.

Someone's groups are missing. Check that your provider sends a groups attribute, and that its name is one Examplary reads. If not, fill in its name under Attributes and advanced settings.

The test says there's no persistent NameID or stable user ID. Your provider sends a transient Name ID, which changes on every sign-in. Send a persistent or email Name ID, or a stable user ID attribute such as eduPersonPrincipalName. If Examplary doesn't recognise its name, fill it in under Stable user ID.

SAML single sign-on with Entra ID, Okta, ADFS, Shibboleth or Google · Examplary