Single Sign-On

SAML 2.0 Integration

Federate your identity provider with Hygrade Business so employees sign in with the same credentials they use for the rest of your workplace — no additional passwords, no separate user directory to maintain.

i

Roles. Hygrade Business acts as the Service Provider (SP). Your organization’s IdP — Okta, Microsoft Entra ID, Ping, ADFS, Google Workspace, or any SAML 2.0-conformant IdP — is the authority for authentication.

Overview

Hygrade supports both SP-initiated and IdP-initiated sign-in. In the SP-initiated flow, users land on the Hygrade portal and are redirected to your IdP to authenticate, then bounced back with a signed assertion. In the IdP-initiated flow, users launch Hygrade from a tile in your corporate app launcher.

Hygrade service provider metadata

Provide these values to your identity team, or import our metadata XML directly — most IdPs accept a metadata URL and will configure themselves automatically.

Entity ID (Audience)
PRODhttps://order.hygradebusiness.com/saml/metadata
TESThttps://test.hygradebusiness.com/saml/metadata
Assertion Consumer Service
PRODhttps://order.hygradebusiness.com/saml/acs
TESThttps://test.hygradebusiness.com/saml/acs
Single Logout Service
PRODhttps://order.hygradebusiness.com/saml/sls
TESThttps://test.hygradebusiness.com/saml/sls
SP metadata XML
PRODhttps://order.hygradebusiness.com/saml/metadata
TESThttps://test.hygradebusiness.com/saml/metadata
NameID format
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
ACS binding
urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
RelayState (optional)
Deep-link path, e.g. /tab/forms/catalog/1234

Example SP metadata

The live metadata document is served at the URL above. A representative excerpt:

sp-metadata.xml
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
    entityID="https://order.hygradebusiness.com/saml/metadata">
  <SPSSODescriptor AuthnRequestsSigned="true"
      WantAssertionsSigned="true"
      protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <KeyDescriptor use="signing">
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <X509Data><X509Certificate>MIIDazCCAlOgAwIBAgIUZ...</X509Certificate></X509Data>
      </KeyInfo>
    </KeyDescriptor>
    <SingleLogoutService
        Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
        Location="https://order.hygradebusiness.com/saml/sls"/>
    <NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat>
    <AssertionConsumerService index="0" isDefault="true"
        Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
        Location="https://order.hygradebusiness.com/saml/acs"/>
  </SPSSODescriptor>
</EntityDescriptor>

Required SAML attributes

The SAML <AttributeStatement> returned by your IdP must include the attributes below. Hygrade uses these to create or update the shopper record on each sign-in ("just-in-time provisioning"), unless SCIM is enabled.

AttributeTypeRequiredDescription
NameIDstringYes Email address, sent as the SAML Subject’s NameID. Used as the stable user identifier.
emailstringYes Same value as NameID. Included as an attribute for IdPs that don’t surface the subject separately.
firstNamestringYes Given name. Displayed in the portal header and on order confirmations.
lastNamestringYes Family name.
custIdstringOptional The Hygrade customer account identifier assigned to your organization. Not required — Hygrade will infer the customer account from the IdP’s entity ID when this attribute is omitted. Provide only when your IdP federates multiple Hygrade customer accounts.
groupsstring (multi-valued)Recommended Role membership. Any of buyer, approver, chief_approver, customer_admin. Controls approval routing and catalog access.
costCenterstringOptional Default cost center code applied to orders placed by this user.
departmentstringOptional Free-text department label; surfaced on reports and exports.
employeeIdstringOptional Your internal employee identifier. Written through to order records.

Example assertion

assertion-excerpt.xml
<saml:AttributeStatement>
  <saml:Attribute Name="email">
    <saml:AttributeValue>jane.doe@acmecorp.com</saml:AttributeValue>
  </saml:Attribute>
  <saml:Attribute Name="firstName">
    <saml:AttributeValue>Jane</saml:AttributeValue>
  </saml:Attribute>
  <saml:Attribute Name="lastName">
    <saml:AttributeValue>Doe</saml:AttributeValue>
  </saml:Attribute>
  <saml:Attribute Name="custId">
    <saml:AttributeValue>ACME001</saml:AttributeValue>
  </saml:Attribute>
  <saml:Attribute Name="groups">
    <saml:AttributeValue>buyer</saml:AttributeValue>
    <saml:AttributeValue>approver</saml:AttributeValue>
  </saml:Attribute>
  <saml:Attribute Name="costCenter">
    <saml:AttributeValue>CC-4420</saml:AttributeValue>
  </saml:Attribute>
</saml:AttributeStatement>

What Hygrade needs from your IdP

Share the following with your implementation engineer. A metadata URL is strongly preferred — it future-proofs certificate rotations on your side.

IdP Entity IDstringrequired
The unique issuer identifier your IdP sends in the SAML <Issuer> element.
SSO URLURLrequired
The HTTP-Redirect endpoint Hygrade will send AuthnRequest messages to.
X.509 signing certificatePEMrequired
The public certificate Hygrade will use to verify assertion signatures.
IdP metadata URL or XML fileURL / file
Strongly preferred. Hygrade refreshes from this URL periodically so that your next signing cert rotation is automatic.
Single Logout URLURL
Optional. If provided, signing out of Hygrade will also terminate the IdP session.

Identity provider setup

Step-by-step walkthroughs for the most common IdPs. The underlying SAML requirements are identical — only the admin UI differs.

Okta

  1. In the Okta Admin Console, open Applications → Applications and click Create App Integration. Select SAML 2.0.
  2. Give the app the name Hygrade Business and upload the Hygrade logo (available on request).
  3. Under SAML Settings:
    • Single sign-on URL: https://order.hygradebusiness.com/saml/acs
    • Audience URI (SP Entity ID): https://order.hygradebusiness.com/saml/metadata
    • Name ID format: EmailAddress
    • Application username: Email
  4. Add the attribute statements in the table below (map to your Okta profile attributes).
  5. After saving, open the Sign On tab and copy the Metadata URL. Send it to integrations@hygradebusiness.com.
  6. Assign the app to the appropriate Okta groups.
NameName formatValue
emailBasicuser.email
firstNameBasicuser.firstName
lastNameBasicuser.lastName
custIdBasicoptional constant, e.g. "ACME001" — only if federating multiple Hygrade accounts
groupsBasicMatches regex  ·  ^hygrade-.*

Microsoft Entra ID (formerly Azure AD)

  1. In the Entra admin center, open Enterprise applications → New application → Create your own application. Name it Hygrade Business and choose Integrate any other application you don’t find in the gallery.
  2. Open Single sign-on and select SAML.
  3. Edit Basic SAML Configuration:
    • Identifier (Entity ID): https://order.hygradebusiness.com/saml/metadata
    • Reply URL (ACS): https://order.hygradebusiness.com/saml/acs
    • Sign on URL: https://order.hygradebusiness.com/saml/login
    • Logout URL: https://order.hygradebusiness.com/saml/sls
  4. Edit Attributes & Claims and add claims matching the attribute table above, pointed at the corresponding user. fields (for example user.givenname, user.surname, user.mail).
  5. Under SAML Signing Certificate, download Federation Metadata XML and send it to integrations@hygradebusiness.com.
  6. Assign the relevant users or groups under Users and groups.

Ping Identity (PingOne / PingFederate)

  1. In PingOne, open Applications → Add Application → Advanced Configuration → SAML.
  2. Provide the following under Configure SAML Connection:
    • ACS URL: https://order.hygradebusiness.com/saml/acs
    • Entity ID: https://order.hygradebusiness.com/saml/metadata
    • SLO Endpoint: https://order.hygradebusiness.com/saml/sls
    • Subject NameID Format: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
  3. Under Attribute Mapping, map each Hygrade attribute name to the corresponding PingOne directory attribute. custId is optional — set it to a literal constant only if a single IdP federates multiple Hygrade customer accounts.
  4. Enable Sign Assertion. Encryption is optional.
  5. From the app’s Configuration tab, download the SAML Metadata and forward it to Hygrade.

Active Directory Federation Services (ADFS)

  1. Open AD FS Management → Relying Party Trusts → Add Relying Party Trust.
  2. Choose Claims aware, then Import data about the relying party published online and enter: https://order.hygradebusiness.com/saml/metadata.
  3. Accept the default access control policy (or scope it to your SSO AD group).
  4. After creation, open Edit Claim Issuance Policy and add the following rules:
    • Send LDAP Attributes as Claims — map E-Mail-Addresses → email, Given-Name → firstName, Surname → lastName.
    • Transform an Incoming Claim — transform email → Name ID with format Email.
    • Send Claims Using a Custom Rule — (optional) issue custId as a literal string if your ADFS federates multiple Hygrade customer accounts.
  5. Export the ADFS federation metadata from https://adfs.your-domain.com/FederationMetadata/2007-06/FederationMetadata.xml and send the URL to Hygrade.

Sign-in flow

The SP-initiated flow is the default. A user landing on order.hygradebusiness.com who is not yet authenticated is redirected to your IdP, authenticates, and is returned with a signed assertion.

SP-initiated SSO
  Browser                    Hygrade (SP)                    Your IdP
     │                             │                              │
     │  GET /portal ────────────── │                              │
     │  <302 to IdP SSO URL> ←──── │                              │
     │                             │                              │
     │  GET ?SAMLRequest=...  ─────────────────────────────────→  │
     │                             │                              │
     │                             │        (authenticate)        │
     │                             │                              │
     │  POST /saml/acs  ←──────────────────────────────────────── │
     │  SAMLResponse=<signed assertion>                           │
     │                             │                              │
     │                             │ verify signature, extract    │
     │                             │ attributes, start session    │
     │                             │                              │
     │  <302 to RelayState> ←───── │                              │

Testing your integration

  1. Install SAML-tracer (Firefox / Chrome) to inspect requests and responses in the browser.
  2. Navigate to https://order.hygradebusiness.com/saml/login and authenticate.
  3. Confirm that the SAMLResponse contains all required attributes and is signed by your IdP’s current certificate.
  4. On your first successful round-trip, Hygrade will show a test mode banner; your implementation engineer will flip the tenant to production once you confirm the mapping is correct.

Testing endpoint. Use https://order.hygradebusiness.com/saml/debug during integration. It decodes the assertion and displays all received attributes without starting a portal session. The endpoint is automatically disabled once your tenant is placed in production.

Troubleshooting

Invalid signature / signature verification failed

Your IdP is signing assertions with a certificate Hygrade doesn’t have on file, or the certificate has been rotated. Resend your current metadata XML or signing certificate. If you provided a metadata URL, confirm it is reachable from the public internet.

Missing required attribute

The assertion reached Hygrade but is missing a required attribute. Review the attribute table and confirm each is emitted by your IdP. Attributes marked Optional can be left out; the required ones (email, firstName, lastName) must be present on every assertion.

NameID policy mismatch / urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy

The IdP is returning a NameID format other than emailAddress. Reconfigure the application’s NameID settings; Hygrade will not accept transient or persistent NameIDs.

Clock skew / NotBefore condition failed

Hygrade allows 180 seconds of clock skew on SAML timestamps. If you see this error, verify both your IdP and the requesting device have accurate time (NTP-synchronized).

User authenticates but cannot access any catalog

The user was provisioned successfully but no groups were sent, so no role was granted. Either include a groups attribute in the assertion or ask your Hygrade admin to assign a default role to the user in the portal.

Security & certificate rotation


Next: once SAML is live, many customers enable SCIM provisioning so that hires and departures sync automatically, rather than relying on just-in-time user creation.