Prerequisites
Before you start, make sure you have:- A Prelude account with access to Prelude Auth
- An Application ID (
appID): see Applications - Your Management API key for backend calls
- OAuth credentials from the customer’s IdP application (client ID, client secret, and the issuer URL)
- Admin access to the Identity Provider you want to connect
Supported providers
Enterprise connections are available for the OIDC-capable providers:Personal vs enterprise connections
Each OAuth provider config carries atype:
personal(the default): the classic social-login button. At most one per provider, addressed as…/oauth/{provider}.enterprise: a per-customer OIDC connection. An app can hold any number of them per provider, each addressed as…/oauth/{provider}/{connection_id}.
The
type of a connection is immutable. To switch between personal and
enterprise, delete the config and create a new one.Create a connection
Enterprise connections are managed through the same endpoint as social login, withtype set to enterprise and an enterprise block:
connection_id (an ocon_… identifier). Use it to update, delete, or launch the connection.
Connection behavior
Theenterprise block controls provisioning, login, and profile syncing:
How the flow works
An enterprise login is the same authorization-code flow as social login:- Initiate: Your app starts the flow by email (resolved to a connection via its domain allowlist) or by connection id. Prelude derives the provider from the connection and redirects the user to the IdP.
- Callback: After authenticating, the IdP redirects back and Prelude redirects to your app with a
challenge_token. - Finalize: Your app finalizes the
challenge_token, exactly as for social login.
verify_email OTP step. A login whose IdP email falls outside the allowlist is refused (oauth_email_domain_not_allowed).
Enterprise identities are scoped per connection. The stored identifier is
oauth:{provider}:{connection_id}, so the same provider subject seen through
two different connections never collapses onto one account.Microsoft Entra ID issuer
For a Microsoft connection, setissuer_url to the exact v2.0 issuer of the customer’s tenant, with the tenant ID (a GUID):
/common/v2.0, /organizations/v2.0, a domain name instead of the tenant ID, or a v1 https://sts.windows.net/{tenant-id}/ issuer are refused at login.
The email of a member of this tenant is trusted. The email of a guest account (a user from another tenant) is trusted only when the token carries the xms_edov optional claim set to true. An enterprise login whose email is not verified is refused.
Getting the email from Microsoft Entra ID
Microsoft only includes anemail claim in the id_token when the signed-in user has an email set on their profile, or when the app registration requests the email optional claim. Without an email claim, Prelude falls back to the user principal name (preferred_username), which is never trusted as a verified email, so an enterprise connection refuses the login. Users need an email set on their profile (the mail attribute), and the app registration needs the optional claim:
- In the Azure portal, open App registrations → your app → Token configuration.
- Choose Add optional claim, select ID, and add email.
- Request the
emailscope in the connection’sscopes.
What’s next?
Web integration
Start an enterprise SSO login from the JavaScript SDK.
Social login
Configure classic social-login providers.