Area: Product
Sub-Area: User Management
Applies to: OSS + Cloud
Issue
An SSO user (for example, through Okta) can't log in, gets an error after login, or isn't created in DataHub. This article covers the SSO settings that decide whether a user can log in. It also covers invite links for users who join without SSO.
You Might Be Asking
- Why does a new SSO user get "User with urn ... has not yet been provisioned in DataHub"?
- Why does SSO login fail with "Failed to resolve user name claim"?
- Where do I send invites, and does an invited user conflict with SSO login?
Cause
Causes:
-
Pre-provisioning is on. Just-in-Time (JIT) provisioning is the default. It creates a DataHub user on first SSO login. Pre-provisioning is the opposite. It allows SSO login only for users that already exist in DataHub. Everyone else gets "User with urn
has not yet been provisioned in DataHub. Please contact your DataHub admin to provision an account." -
The username claim is missing. DataHub builds the username from the configured username claim. If the IdP doesn't send that claim, login fails. The frontend log shows "Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: '
', Regex: ' ', Profile: ...". If the regex doesn't match the claim value, it logs "Failed to extract DataHub username from username claim using regex ". -
The callback URL is wrong. The redirect URI you register with the IdP must end in
/callback/oidc. DataHub has no bare/callbackroute. -
The user isn't allowed by the IdP, or lacks a required group. If the IdP returns
access_denied, DataHub shows a 401 "Access denied" page or redirects to the Access Denied Redirect URL, if one is set. If required groups are set, the user needs at least one of them. -
The username differs. DataHub finds an existing account only by an exact URN match,
urn:li:corpuser:<userName>, built from the username claim value.
An invited user (invitation status SENT) who then logs in with SSO under the same username is provisioned through JIT as normal.
Solution
Check SSO provisioning settings
DataHub Cloud
Follow the Cloud OIDC SSO setup.
- Go to Settings > Platform > SSO. You need the Manage Platform Settings privilege.
- Under User Provisioning Strategy, choose Just-in-Time (JIT) Provisioning if new users should be created at first login. Pre-Provisioning blocks users who don't already exist. Choosing Pre-Provisioning also turns off Extract Groups.
- Check the User Name Claim. The form pre-fills
preferred_username. If your IdP doesn't send that claim, set a claim it does send, such asemail. Use User Name Claim Regex to keep part of the value. For example,([^@]+)drops the email domain. - Check the redirect URI shown on the page. Register it with your IdP. It has the form
https://<your-domain>.acryl.io/callback/oidc. Save the form while you are on the same hostname that users use. Saving on a different hostname changes the redirect URI and breaks login. - Click Connect, log out, and log back in with SSO to test.
To read server logs, contact DataHub Support.
Self-hosted
Set these environment variables on the datahub-frontend container, then restart it. See the self-hosted OIDC guide and the provisioning settings.
| Variable | Purpose |
|---|---|
AUTH_OIDC_JIT_PROVISIONING_ENABLED |
JIT provisioning. Default true. |
AUTH_OIDC_PRE_PROVISIONING_REQUIRED |
Login only for existing users. Default false. |
AUTH_OIDC_USER_NAME_CLAIM |
Claim used as the username. Server default is email. |
AUTH_OIDC_USER_NAME_CLAIM_REGEX |
Extracts part of the claim. Default (.*). |
These variables map to keys in datahub-frontend/conf/application.conf. On Kubernetes, put them under datahub-frontend.extraEnvs in your Helm values.yaml. See the Kubernetes section.
Read the datahub-frontend container logs to see the messages above. See OIDC troubleshooting.
Check the IdP side (Okta)
See IdP setup for OIDC.
- Assign the user to the DataHub application in Okta.
- Make sure Okta sends the username claim you configured.
- Register the redirect URI
https://<your-datahub-host>/callback/oidcin the Okta application. For a local install it ishttp://localhost:9002/callback/oidc. - If you use group extraction, make sure Okta adds a groups claim to the ID token. If you use a custom authorization server and request a
groupsscope, that scope must exist on it. - Group extraction only works with JIT on. Each login replaces the user's SSO group membership, which clears group membership assigned in the DataHub UI.
Send invites
On DataHub Cloud, the Invite Users modal has Via Email and Share Link tabs. A link is created for a role, and users who join with it get that role. Anyone with the link can join. Generating a new link makes old links invalid. See Onboarding users.