Skip to content

Generic SAML 2.0 provider

Myra AI Workspace signs users in through any SAML 2.0 identity provider (IdP) — Okta, Auth0, Keycloak, ADFS, and enterprise directories. Myra acts as the SAML service provider (SP). For Microsoft Entra ID, follow the dedicated Microsoft Entra ID guide.

Single sign-on authenticates existing accounts only — provision the users first (or switch on just-in-time provisioning, see the SSO overview). Required role: tenant admin or admin (the SSO_MANAGE permission).

First sign-in / account already linked. The first sign-in links the identity to the existing account. It is refused (sso_denied) when the account is already linked to a different identity (for example because the IdP issues a per-application NameID that changed); see account linking. Contact support to recover a refused link.

Note: The examples use the production admin-API host ai-api-admin.myra.eu. On the integration environment, substitute ai-api-admin-int.myra.eu.


Reading the SP values from Myra

  1. Open Organisation in the user-block menu, then People → Sign-in & provisioning and select the Identity provider tab (a platform admin first opens the organisation).
  2. Select the SAML 2.0 SSO checkbox. -> The panel displays the SP metadata URL and the ACS URL to register at the identity provider. The Logout (SLS) URL follows the same pattern and appears in the served metadata when a Single Logout URL is set.

The SP URLs follow this pattern, where <tenant-id> is the Myra tenant UUID (the id from the tenant list, not the slug). The UUID is matched case-insensitively (register the lower-case form the SP metadata emits: the IdP-signed Audience and Destination are compared exactly); a value that is not a UUID is rejected (400, or an sso_failed sign-in redirect on start/acs):

IdP field Myra SP value
Entity ID / Identifier https://ai-api-admin.myra.eu/admin/auth/saml/<tenant-id>/metadata
Assertion Consumer Service (ACS) / Reply URL https://ai-api-admin.myra.eu/admin/auth/saml/<tenant-id>/acs
Single Logout Service (SLS) / Logout URL https://ai-api-admin.myra.eu/admin/auth/saml/<tenant-id>/sls

These URLs are served on the admin-API host over HTTPS, not on the application host ai.myra.eu. The SP metadata document at the metadata URL is authoritative.

Note: Register the values exactly as the Myra panel and the SP metadata show them. A host or scheme mismatch causes the identity provider to reject the assertion.

Registering the SP at the identity provider

  1. Create a new SAML application at the identity provider.
  2. Enter the Myra Entity ID, ACS URL, and Logout URL from the table above.
  3. Set the NameID (the unique user identifier) to a stable value — the user's email address or a persistent object identifier.
    • Myra rejects a transient NameID, because a per-session identifier cannot be a stable identity key. Accepted formats are persistent, emailAddress, unspecified, X509SubjectName, kerberos, and WindowsDomainQualifiedName. An omitted Format defaults to unspecified.
  4. Turn assertion encryption off. Myra does not support encrypted assertions and refuses every encrypted assertion (sso_failed). The signed assertion travels over HTTPS.
  5. Download the IdP signing certificate in PEM (Base64) form.
  6. Record the IdP entity ID and the IdP SSO URL.
  7. If the organisation uses Single Logout, record the IdP SLO URL.
  8. Assign the tenant's users to the application.

Configuring the SAML panel in Myra

  1. On Organisation › People › Sign-in & provisioning, in the SAML 2.0 SSO panel, enter the IdP values.
  2. Optional: import the IdP values from its metadata document.
    • In the IdP metadata URL field, enter the https URL of the IdP's SAML metadata and select Import. -> The IdP entity ID, IdP SSO URL, signing certificates and Single Logout URL are filled in for review. Nothing is saved until you select Save SAML config.
    • If Myra refuses the URL (not https, or a private or internal address) or the document, the form stays unchanged and the reason is shown.
    • When the URL is saved, Myra re-reads it once a day and keeps the IdP certificates current, so an IdP certificate rollover needs no manual step. The panel shows Last refreshed from metadata. If a daily refresh fails, or the metadata names a different entity ID, the stored configuration stays as it was and the panel shows the reason. Clear the field and save to stop the refresh.
    • Each configuration change by the refresh is audited as saml_config.metadata_refreshed.
  3. In the IdP entity ID field, enter the identity provider's entity ID.
  4. In the IdP SSO URL (HTTP-Redirect) field, enter the identity provider's SSO URL.
  5. In the IdP signing certificate (PEM) field, paste the signing certificate.
    • A SAML signing certificate is public, so Myra stores and returns it in full.
    • During a certificate rollover at the identity provider, paste the new certificate in the Next signing certificate (rollover, optional) field. Myra accepts both certificates until you remove the old one.
  6. In the NameID format drop-down list, select the format that matches the identity provider.
    • The drop-down offers persistent, emailAddress, X509SubjectName, kerberos, and WindowsDomainQualifiedName. Select persistent for a stable object identifier or emailAddress for an email NameID. The backend also accepts unspecified (Microsoft Entra's default) even though the drop-down omits it — the assertion's own Format is validated independently of this selection.
  7. In the Allowed email domains field, enter the permitted domains.
    • This is the allowed-domain list. Separate domains with commas, semicolons or new lines (a space does not separate). Public e-mail providers such as gmail.com are refused, and so is a domain that another organisation or its users already use. Myra does not check that you own the domain.
  8. If the organisation uses Single Logout, enter the IdP SLO URL in the Single Logout URL (optional) field.
    • The Single Logout endpoint appears in the SP metadata only when this field is set.
  9. If the organisation requires signed authentication requests, select the Sign authentication requests option.
    • Signed requests use a gateway-wide SP signing key provisioned by the platform operator. If the key is not provisioned, the request path — and inbound Single Logout — fails closed. Provision the key before enabling this option.
  10. If required, map SAML attribute values to Myra roles, departments or groups. This happens in the Mapping card below the summary cards (not in the SAML form); the card has its own Save changes:
    • In Groups come from, pick the SAML attribute that carries the values (groups, the Microsoft groups claim, memberOf or department), or choose Custom... and type its name.
    • Department comes from sets the SAML attribute that assigns a person's department at sign-in, or SCIM: enterprise department only to turn it off. It needs a saved SAML configuration and the SSO permission, and is saved with the card's Save changes.
    • If the IdP sends no groups is fixed: a sign-in without any group values keeps the person's current memberships.
    • The table lists every mapping: IdP value, what it Becomes (Role, Department or Group), the Target, and People (the active users the identity provider put on that target; a dash when the count could not be loaded). Select + Add mapping to add one, or Edit on a row to change or remove it (Remove mapping). Apply in the dialog changes the table only; Save changes stores it, Cancel discards the changes. Only listed values grant anything. Every mapping needs a value and a target, and an IdP value may appear only once. Removing every row clears the mapping. The mapping is one per organisation, shared with OIDC and SCIM, and is saved with the settings of the configured identity provider: until one is set up the card is read-only.
    • Role targets are offered only to tenant administrators (and platform administrators); the choices are the organisation's roles, including its custom roles, never the platform administrator role. Without that role, role rows are shown locked, and while role targets exist Groups come from cannot be changed. See Role targets in the group mapping.
    • Department targets need the permission to manage departments: without it, department rows are shown locked and Department cannot be chosen. A stored value the card cannot edit is shown read-only and saved back unchanged; a stored value that is not a valid target is flagged and must be removed before saving. A target that no longer exists is flagged in its row.
    • A department target whose department was deleted is flagged; pick another department or remove the row before saving.
    • Check a user (the sky line under the table) shows what a sign-in would give, before anyone signs in: enter the email address of a member (optionally with IdP values, to see what a sign-in that sends them would change), or only IdP values (comma-separated) for a first sign-in, then select Check. To check a person who is not a member yet, tick First sign-in (not a member yet) and enter the address they would sign in with (IdP values stay optional); the address's domain is checked against the Allowed email domains, and a domain that is not on the list is refused (so is any address when no identity-provider configuration is saved for that sign-in method). For a first sign-in, The IdP confirms the email address says whether the identity provider marks the address as verified. The line reads, for example, jana.weber@example.com → role Member, department Legal, group Contract reviewers, budget $40 / month (from Legal), gateways legal-eu-local (default) and frontier-eu (via Contract reviewers). A sign-in that would be refused says so (refused: an unverified email, or no account while creating people on their first sign-in is off), and an address no member has answers No member of this organisation has that email address. It runs the same resolution the sign-in does against the saved mapping and writes nothing. It does not check the seat limit or an address already in use (it says so under the line); it checks the allowed email domains only when a first sign-in is checked by address. Details: SSO preview.
    • The attribute is synced into the saml_claim memberships at every sign-in. An assertion without the attribute keeps the user's memberships. With the Entra groups.link overage marker, Myra looks the groups up in Microsoft Graph, but only when the tenant also has the Entra OIDC credentials and Directory ID saved and the IdP entity ID is https://sts.windows.net/<directory-id>/; otherwise, or if Graph fails, the memberships are kept. An empty or malformed attribute clears them. Details: Identity-provider group claim sync.
  11. To require multi-factor authentication at the identity provider, enter an authentication context class URI in the Required authentication context (MFA) field, for example urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken.

    • Myra requests it from the IdP as RequestedAuthnContext (comparison exact) and accepts the sign-in only when the signed assertion's AuthnContextClassRef equals it.
    • An IdP that cannot satisfy an exact request refuses it, and the user lands on the generic sign-in failure message (sso_failed), not on the multi-factor message.
    • For ADFS and Microsoft Entra, the class for multi-factor sign-in is http://schemas.microsoft.com/claims/multipleauthn.
    • The setting governs sign-ins through this identity provider only. It does not apply to email one-time-code sign-in or to Entra access tokens used by the Microsoft 365 integration.
    • Leave the field empty for no requirement. When the assertion does not carry it, the user is sent back to the sign-in page with a message that multi-factor authentication is required, and no session is created. The refusal is audited as saml.mfa.login_denied. The setting applies to new sign-ins only; sessions that are already signed in are not ended. A stored value that is unreadable is never treated as "no requirement": the sign-in is refused with the "temporarily unavailable" message.

    A user whose account an administrator has disabled cannot sign in through SSO even if they were linked before: the sign-in is refused, no session is created, and the refusal is audited as saml.account_disabled.login_denied. When several first sign-ins of the same person arrive at the same moment, they all resolve to the same account, exactly as a single sign-in would; none is refused as disabled merely because another one is creating the account. An account an administrator disabled, or one in another tenant, is still refused.

  12. Select Save SAML config. -> SAML configuration saved. is shown, and the tenant's users can sign in through the identity provider over SAML. When Myra refuses a value, the panel shows The SAML configuration was not accepted: followed by the reason.

To switch SAML off for the tenant, select Remove SAML config.

Trust-boundary rejections

Myra never parses SAML XML in the gateway; an isolated, loopback-only validator verifies every signature. Myra rejects an unsigned assertion, signature-wrapping, deprecated algorithms (RSA-SHA1), a wrong signing certificate, an expired or wrong-audience or wrong-recipient condition, a missing InResponseTo (an identity-provider-initiated assertion is not accepted at the ACS), an encrypted assertion (encryption is not supported), a missing NameID, a non-identity NameID, and a NameID that is blank, has leading or trailing whitespace, contains control or invisible characters, is not valid UTF-8, or is longer than 255 characters (401, nothing is signed in). Identity links match the NameID byte-exact: Alice@example.com and alice@example.com are different identities, so keep the NameID value stable and identically cased in the IdP. An assertion without attributes is accepted when the NameID is an email address (or the identity is already linked): the identity is always the signed NameID, never an attribute. On the first sign-in, the NameID must match an existing account in an allowed email domain; without an email in the NameID or an email attribute, the first sign-in is refused (sso_denied). Assertion timestamps are validated with a ±120-second clock-skew tolerance. For the full contract, see Admin API authentication.

Known limitation: no verified-email signal

A SAML assertion carries no email_verified flag, so Myra cannot tell whether the identity provider verified the email address; the signed assertion and the tenant's allowed email domains are the only controls on the first sign-in. The Trust email addresses from this identity provider switch of OIDC does not apply to SAML. Proposal (not yet decided): require the same switch for SAML first sign-in.

Troubleshooting

Symptom Cause Remedy
The user sees the generic sign-in failure instead of the multi-factor message Required authentication context (MFA) is set, and the IdP cannot satisfy the exact RequestedAuthnContext Myra sends, so it refuses the request Set the field to a class the IdP can issue (for ADFS and Entra, http://schemas.microsoft.com/claims/multipleauthn), or leave it empty and enforce MFA at the IdP
The panel shows Last daily metadata refresh failed The IdP metadata URL was unreachable, the document was invalid, or its entity ID differs from the stored one The panel states the failure category (not allowed, unreachable, rejected, validator unavailable). Check the URL and the IdP metadata; the stored configuration keeps working. Fix the IdP or the field and save again
The user sees the message that multi-factor authentication is required The signed assertion's AuthnContextClassRef does not equal the configured class Check the class the IdP actually emits for the sign-in and correct the field

Single Logout

When the tenant configures the Single Logout URL (optional) field and the user signed in through SAML, Myra propagates a sign-out to the identity provider so the directory session also ends. An inbound Single Logout message must carry a valid signature; an unsigned or forged LogoutRequest is rejected. Myra clears the caller's own local session cookie in every case, but propagates to the identity provider and grants trust only on a verified signature.

Request limits and the refusal lockout

SAML sign-in start and ACS accept 1000 requests per minute per client IP and tenant by default (the sso_flood_cap_per_min setting, range 500-100000). If 500 sign-ins are refused within a minute (bad signature, wrong audience, replayed assertion; not an unreachable validator or an IdP outage), that client IP is locked out of this tenant's SAML sign-in for 30 minutes and sees the rate-limit message on the login page. Other IPs are not affected. Saving the SAML configuration, or a metadata refresh that changes the IdP values, ends the lock at once. See SSO refusal lockout.