SAML Authentication

SAML Authentication

Twinzo supports SAML 2.0 Single Sign-On (SSO) for organization login. With SAML enabled, users authenticate through your corporate Identity Provider (IdP) and are signed into the Twinzo portal without entering a separate Twinzo password.

Overview

SAML authentication connects your IdP (e.g. Microsoft Entra ID / Azure AD, Okta, ADFS, Keycloak) to Twinzo as a Service Provider (SP). After setup, users enter their organization name on the Twinzo login page and are redirected to your IdP for authentication.

Authentication flow

  1. User enters the organization name on the Twinzo login page.

  2. Twinzo sends a SAML AuthnRequest to your IdP.

  3. User authenticates at the IdP.

  4. IdP POSTs a signed SAML Response to the Twinzo Assertion Consumer Service (ACS) URL.

  5. Twinzo validates the response signature and matches the user by email or NameID.

  6. User is signed in to the portal.

Prerequisite: Users must already exist in Twinzo before they can sign in via SAML. SAML does not auto-provision new accounts.

What you need to configure

Setting up SAML requires configuration on both sides:

  • Your Identity Provider — register Twinzo as a SAML application (Service Provider).

  • Twinzo portal — enter IdP details in Settings → Client (see Client settings).

Identity Provider (IdP) setup

Register a new SAML 2.0 application in your IdP with the following Service Provider values. Replace {portal-url} with your Twinzo portal URL (e.g. https://portal.twinzo.eu) and {client-guid} with your Client GUID from Settings → Client.

Required SP values

Setting

Value

Setting

Value

Entity ID / Audience / Issuer

{portal-url}/login/org/saml20/consume/{client-guid}

ACS URL / Reply URL / Consumer URL

{portal-url}/login/org/saml20/consume/{client-guid}

Response binding

HTTP-POST

Protocol

SAML 2.0

Information to collect from your IdP

After creating the SAML application, provide the following to Twinzo (via Settings → Client or your Twinzo contact):

Item

Description

Item

Description

IdP SSO URL

The Single Sign-On endpoint URL of your IdP (also called Login URL or SAML 2.0 Endpoint).

IdP signing certificate

The X.509 certificate used by your IdP to sign SAML responses (PEM format).

User attributes

Twinzo uses SAML attributes to identify users and optionally update their profile. Configure your IdP to include:

Purpose

Supported attribute names

Purpose

Supported attribute names

User identification (required)

email, mail, User.email, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress, or NameID (matched against Twinzo login)

First name (optional)

first_name, givenName, User.FirstName, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

Last name (optional)

last_name, sn, User.LastName, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname

SAML modes

Twinzo supports two SAML request modes. The mode is selected in Settings → Client → SAML 2.0 Mode.

legacy_redirect (default)

Uses HTTP-Redirect binding to send the AuthnRequest to the IdP. This is the simpler mode and works with most IdPs.

Required Twinzo configuration:

  • SAML 2.0 Consumer URL — your IdP SSO URL

  • SAML 2.0 Certificate — IdP signing certificate (PEM)

strict_post_signed

Uses HTTP-POST binding with a signed AuthnRequest. Use this mode when your IdP requires signed authentication requests.

Required Twinzo configuration:

  • SAML 2.0 IdP SSO URL — your IdP SSO endpoint

  • SAML 2.0 SP Entity ID — Entity ID registered at the IdP (defaults to the ACS URL if not set)

  • SAML 2.0 Certificate — IdP signing certificate (PEM)

  • SAML 2.0 Signing Cert PEM — SP signing certificate (PEM)

  • SAML 2.0 Signing Private Key PEM — SP private key (PEM)

Optional configuration:

  • SAML 2.0 ACS URL — custom Assertion Consumer Service URL (defaults to {portal-url}/login/org/saml20/consume/{client-guid})

  • SAML 2.0 NameID Policy Format — e.g. urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress

  • SAML 2.0 Requested Authn Context — e.g. urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport

In strict_post_signed mode, you must generate an SP signing certificate and private key pair, upload both to Twinzo, and register the SP certificate with your IdP if it requires one.

Twinzo portal configuration

All SAML settings are configured in the Twinzo admin portal under Settings → Client.

Setting

Configuration key

Mode

Description

Setting

Configuration key

Mode

Description

SAML 2.0 Mode

SAML20_MODE

Both

legacy_redirect or strict_post_signed

SAML 2.0 Consumer URL

SAML20_CONSUMER_URL

legacy_redirect

IdP SSO URL

SAML 2.0 Certificate

SAML20_CERTIFICATE

Both

IdP signing certificate (PEM)

SAML 2.0 IdP SSO URL

SAML20_IDP_SSO_URL

strict_post_signed

IdP SSO URL

SAML 2.0 SP Entity ID

SAML20_SP_ENTITY_ID

strict_post_signed

SP Entity ID at IdP

SAML 2.0 ACS URL

SAML20_ACS_URL

strict_post_signed

Custom ACS URL (optional)

SAML 2.0 Signing Cert PEM

SAML20_SIGNING_CERT_PEM

strict_post_signed

SP signing certificate

SAML 2.0 Signing Private Key PEM

SAML20_SIGNING_PRIVATE_KEY_PEM

strict_post_signed

SP private key

SAML 2.0 NameID Policy Format

SAML20_NAMEID_POLICY_FORMAT

strict_post_signed

NameID format (optional)

SAML 2.0 Requested Authn Context

SAML20_REQUESTED_AUTHN_CONTEXT

strict_post_signed

Authn context (optional)

Setup checklist

Obtain your Client GUID from Settings → Client
Create a SAML 2.0 application in your IdP
Set Entity ID and ACS URL to {portal-url}/login/org/saml20/consume/{client-guid}
Configure user attribute mapping (email is required for user matching)
Export the IdP signing certificate (PEM format)
Enter IdP SSO URL and certificate in Twinzo Settings → Client
If using strict_post_signed: generate SP cert/key pair and register with IdP
Ensure all SAML users exist in Twinzo with matching email or login
Test login with an existing user account

Troubleshooting

Issue

Possible cause

Issue

Possible cause

Login returns to Twinzo login page

User does not exist in Twinzo, or email/NameID does not match an existing account

SAML button not shown

SAML is not configured — check Consumer URL (legacy mode) or IdP SSO URL + SP Entity ID (strict mode)

Invalid signature error

Wrong IdP certificate uploaded, or certificate has been rotated at IdP

IdP rejects AuthnRequest

Entity ID or ACS URL mismatch; try strict_post_signed mode if IdP requires signed requests

Need help?

Contact your Twinzo representative with your Client GUID, IdP type, and the SAML mode you intend to use. We can assist with initial configuration and testing.

If you encounter any issues or need assistance with using this product, please do not hesitate to reach out for support. Our team is here to help you resolve any problems and answer any questions you may have.
To create a support ticket, visit our support portal at https://partner.twinzo.eu/helpdesk/customer-care-1