Skip to main content

User Provisioning and First Login

You can create users in OpenMetadata before they sign in. This page explains what happens when one of those users signs in through SSO or LDAP for the first time: whether OpenMetadata reuses the account you created or makes a new one.

How OpenMetadata Finds the User

At sign-in, OpenMetadata reads the user’s email address from the identity provider and looks for an existing, active user with the same email. If it finds one, it signs the user in to that account and updates it. If it doesn’t, it creates a new user, or rejects the sign-in. For more information, see When No User Matches. Where the email comes from depends on the provider: For the match to work, the email in the identity provider must be the same as the email you entered when you created the user in OpenMetadata.
Matching by email applies to OIDC and SAML only when Email Claim is set and no jwtPrincipalClaimsMapping is configured. Otherwise OpenMetadata uses the older behavior and matches on the username it builds from the token. A user you created with a different username then doesn’t match, and OpenMetadata creates a second account. For more information, see Configuration Parameters.

What Is Updated at Login

When OpenMetadata reuses an existing user, it updates the account from what the identity provider sends: OpenMetadata doesn’t change the email or username. Other details, such as the display name, teams, roles, and admin status, can change as described above.

Role Assignment

How roles work at first login depends on the provider.

LDAP

OpenMetadata reads the groups the user belongs to in the directory and applies the Auth Roles Mapping you configured. Auth Reassign Roles decides which roles that mapping can change at each login:
  • A role in Auth Reassign Roles comes from the mapping on every login. If the user’s groups no longer map to it, OpenMetadata removes it.
  • A role you gave the user in OpenMetadata that is not in Auth Reassign Roles is kept.
  • A mapped role that is not in Auth Reassign Roles is not assigned.
  • Admin follows the same rule. OpenMetadata changes the admin flag at login only when Auth Reassign Roles contains the Admin Role Name (or *).
For example, you create a user with the DataConsumer role. If Auth Reassign Roles is Admin only, the user keeps DataConsumer and gets admin only when a mapped group grants it. If Auth Reassign Roles includes DataConsumer, the role is replaced by whatever the user’s groups map to. For more information, see LDAP SSO.

OIDC

When Use Roles from Provider (useRolesFromProvider) is on, OpenMetadata takes roles from the roles claim in the user’s token at each login and replaces the roles the user had. If the token has no roles claim, the user loses those roles. A user who isn’t in the configured admin list also loses admin when the token doesn’t grant it. When it is off, roles you set in OpenMetadata stay as they are.

SAML

OpenMetadata doesn’t assign roles from the SAML response. Roles you set in OpenMetadata stay as they are. Teams from the Jwt Team Claim Mapping claim are applied.

When No User Matches

If OpenMetadata finds no user with the email:
  • Enable Self Sign Up is on: OpenMetadata creates a new user. It builds the username from the email prefix. If that username is taken, it adds a suffix.
  • Enable Self Sign Up is off: The sign-in fails with User not registered. Contact administrator to create an account.
If Enable Self Sign Up is on but the email’s domain isn’t in Allowed Email Registration Domains, the sign-in fails with Email domain not allowed for self-signup. If the matching user was deleted, the sign-in fails with Your account has been deactivated. Contact your administrator. Restore the user first.

What Causes Duplicate Users

You get two accounts for one person when the first login doesn’t match the user you created, and Enable Self Sign Up is on. The usual causes are:
  • Different email: The email in the identity provider differs from the one you entered in OpenMetadata. Check for a different domain, an alias, or a typo. For LDAP, check the value of the mail attribute.
  • Different claim: Email Claim points to a claim that holds something other than the email you used, such as a user principal name that differs from the mail address.
  • Older username matching: Email Claim isn’t set, or jwtPrincipalClaimsMapping is still configured, so OpenMetadata matches on the username it builds from the token.
To avoid duplicates, create each user with the email address their identity provider returns, and run Test Login to check the email OpenMetadata reads. If a duplicate already exists, ask the user to sign out, then delete the new account and fix the email on the original one.