Area: Deployment Issues
Sub-Area: SSO / Identity Provider Group Synchronization
Applies to: OSS + Cloud
Issue
You use Okta OIDC SSO with group extraction turned on. DataHub creates groups and group memberships from the groups claim in the user's token. You remove a user from an Okta group, but the user is still a member of the matching DataHub group. Some users also appear twice in the group's member list.
You Might Be Asking
- Why do users I removed from an Okta group still appear in the DataHub group?
- Why does a user appear twice in a DataHub group?
- How do I remove these users from the DataHub group?
- How do I find out which groups are still synced from Okta?
- How do I cut off a user's access right away?
- How do I make Okta group changes reach DataHub without waiting for a login?
Cause
Two behaviors combine here.
- DataHub reads groups from the token only when the user signs in. Group extraction works only when just-in-time provisioning is on. At each sign-in, DataHub replaces the user's SSO group list with the groups in the token claim (set by
AUTH_OIDC_GROUPS_CLAIM, defaultgroups). DataHub does not poll Okta between sign-ins. A removal in Okta reaches DataHub at the user's next sign-in. - DataHub keeps two kinds of group membership: SSO membership, written at sign-in, and DataHub-managed membership, written when someone adds a member in DataHub. The first time anyone adds or removes a member of an SSO group in the DataHub UI (or with the
addGroupMembersorremoveGroupMembersmutation), DataHub converts the group. It moves every current member to DataHub-managed membership and marks the group asNATIVE. Sign-in never changes DataHub-managed membership. So after the conversion, removing a user from the Okta group no longer removes them from the DataHub group.
The duplicate rows come from the same conversion. A converted member who is still in the Okta group gets the SSO membership back at their next sign-in. That user now holds both kinds of membership, and the group's member list shows one row for each.
Solution
Remove a user from a converted group
- Remove the user from the group in Okta first. If you skip this, the user's next sign-in adds the SSO membership back.
- In DataHub, open the group, go to the members list, and select Remove from Group on the user. This removes both the SSO membership and the DataHub-managed membership. It also clears both rows for a user who appears twice.
You can do the same with GraphQL:
mutation {
removeGroupMembers(
input: {
groupUrn: "urn:li:corpGroup:<group>"
userUrns: ["urn:li:corpuser:<user>"]
}
)
}
Remove from Group removes both kinds of membership on DataHub Cloud v2.3.0 and later and on DataHub OSS v1.8.0 and later. On earlier versions it removes only the DataHub-managed membership, so a user who also holds the SSO membership stays in the group. Upgrade if you are on an earlier version.
To clean up duplicate rows for users who should stay in the group, leave them in Okta and use Remove from Group. At their next sign-in, they come back as one SSO member.
Find out which groups are converted
Query the group's origin:
query {
corpGroup(urn: "urn:li:corpGroup:<group>") {
origin {
type
}
}
}
-
UNKNOWN: nobody has changed the members in DataHub. Okta sign-in fully controls this group. -
NATIVE: the group is managed in DataHub. Either someone changed its members in DataHub, or someone created the group in DataHub. -
EXTERNAL: the group comes from SCIM provisioning.
Keep Okta in control of a group
For a group with origin UNKNOWN, make all membership changes in Okta only. Don't add or remove its members in DataHub. The DataHub UI has no action that sets a converted group back to Okta control.
Cut off a user's access right away
A user with the Manage Users & Groups privilege can suspend a user in Settings > Users & Groups, or with this mutation. status is a top-level argument:
mutation {
updateUserStatus(urn: "urn:li:corpuser:<user>", status: SUSPENDED)
}
Suspension alone does not keep out a user who can still sign in through Okta. On self-hosted DataHub, and on DataHub Cloud v2.4.1 and later, an SSO sign-in sets a suspended user back to Active. To keep the user out, also remove their access to the DataHub app in Okta.
Sync Okta changes without waiting for a sign-in (DataHub Cloud)
On DataHub Cloud, you can provision users and groups with SCIM from Okta, and turn on Push Groups so Okta sends groups and their members to DataHub. Okta then sends changes as they happen. When you remove a user from a pushed group, or remove them from the DataHub app in Okta, DataHub deactivates that user. See SCIM Integration: Okta and DataHub.
You manage the members of a SCIM group in Okta only. The DataHub UI disables member changes on these groups, and the mutations fail with errors such as Group <urn> was ingested from an external provider and cannot have members manually removed from it.
DataHub identifies users by URN, and URNs are case sensitive. Before you switch, make sure the SCIM userName that Okta sends is the same as the username your SSO sign-in produces, including case.
Related Documentation
- Configuring OIDC Authentication (group extraction and JIT provisioning)
- Authorization using Groups
- SCIM Integration: Okta and DataHub
- SCIM Integration: MS Entra and DataHub
- DataHub GraphQL API
Tags: okta-sso, group-sync, scim, group-membership, identity-provider, oidc, native-group, duplicate-users, access-management