Logging in to openDesk with e-mail addresses as usernames

When your identity provider sends e-mail addresses as usernames, openDesk login can fail unless the matching attribute is aligned. This page explains how to match on mailPrimaryAddress, what changes for local logins, and when to change the upstream claim instead.

On this page

Why e-mail addresses as usernames break openDesk logins

When your upstream identity provider sends an e-mail address as the username, openDesk may not find the account that belongs to that person, even though the sign-in itself succeeds. openDesk federation links your existing identity provider to the Keycloak-based openDesk IdP over OIDC, and it matches each incoming user to an existing account by username or by another attribute such as mailPrimaryAddress. The attribute you choose decides whether a federated login lands on the right account. If the upstream claim carries jane.doe@agency.example but the openDesk account stores jane.doe, the lookup misses and the user cannot reach their workspace. The openDesk federation with external IdP documentation describes the supported matching options. Teams meet this problem most often when their identity provider was built around e-mail addresses as sign-in names.

This matters most for operators of the openDesk IdP and the identity owners who run the upstream directory, because the decision is made once and then applies to every account. The username in openDesk is also the value that the Nubus Directory Importer copies from LDAP or Active Directory, and the username rules that federated logins depend on come from that import. A mismatch can therefore appear at two points: during import and at login. Ask the identity owner whether the upstream claim is the primary mail address, a separate sign-in name or another stable identifier, and whether that value changes when a person is renamed or gets a new alias. A mail address is convenient, but a change to it can break the link between the upstream identity and the openDesk account unless the import and matching rules account for it.

Before go-live, plan a short verification with two or three test accounts. Sign in through federation with each one, then confirm in the IAM that the session maps to the intended openDesk account and not to a new or duplicate account. Include an account whose stored address differs from the sign-in form, such as a different letter case or a recent alias, and confirm how your release and your identity provider handle it in your environment before relying on it. Document the chosen matching attribute with the identity owner, and treat any later change as a planned migration with a rollback path, since switching the attribute affects every existing link at once.

Which attribute to match federated users on

This table compares the three ways to line up upstream identities with openDesk accounts: matching on the username, matching on mailPrimaryAddress, or changing the upstream claim so it sends the username. Read each row against your upstream identity provider and your existing local accounts, since the choice decides which accounts still log in after the change. Confirm exact configuration keys in the openDesk IdP federation documentation for your release before you change anything.

OptionWhen it fitsWhat it requires upstreamEffect on existing local accounts
Match on usernameUpstream usernames already equal the openDesk usernames, often a short login name without an @ signUpstream sends a username claim that matches the openDesk account name exactlyLeast disruption, since existing local usernames keep working unchanged
Match on mailPrimaryAddressUsers sign in with e-mail addresses upstream and the openDesk account carries the same primary addressUpstream sends the address, and the openDesk directory holds a matching primary mail address for every userAccounts without a matching primary address stop matching and need a check before the switch
Change the upstream claim to send the usernameUpstream can be reconfigured and you want openDesk to keep its existing username schemeAn administrator on the upstream side maps the login name into the claim openDesk readsNo change to openDesk accounts, but the upstream mapping must be tested for every user group
Mixed usernames in one directorySome accounts use e-mail addresses and others use short names, such as service or legacy accountsNeeds a documented rule for which attribute each group matches onRisk of duplicate or unmatched identities, so inventory both sets before go-live
Local login fallbackAdministrators keep a local account for break-glass access during federation changesNo upstream change, but the local username is still the openDesk account nameLocal logins depend on the username or address stored in openDesk, so confirm which string to type

How a federated login finds the openDesk account

The login starts at the organization's own identity provider, which sends an OIDC token to the Keycloak-based openDesk IdP. The IdP then matches the username or mailPrimaryAddress claim against accounts in Nubus, and the session reaches the openDesk applications. Accounts originate from the Nubus Directory Importer, so the matching step only works if the value in the token equals the value stored for that user. Check the claim and the matched attribute before go-live.

Federated login matches the token claim to an account that the Directory Importer created.

What switching the LDAP provider changes for local logins

Changing the matching attribute changes how openDesk finds an existing account, so the switch can reach accounts that were never part of the plan. The federation documentation describes matching users by username or by another attribute such as mailPrimaryAddress. An account provisioned through the Directory Importer, through ad-hoc first login or through a manual step may therefore be looked up by a different value after the change. Before you switch, export the existing accounts and record which value each one currently matches on, so you can see which accounts depend on the attribute you are replacing.

The main risks come from the data behind the address. If two directory entries carry the same mailPrimaryAddress, such as a shared mailbox, a reassigned address or an alias that another person also uses, the lookup can no longer identify one person. If a user's primary address changes after provisioning, for example through a name change or a domain migration, the stored account may no longer match the value the upstream provider sends. Depending on the path, that can cause a failed sign-in or a separate account, so test both cases on a non-production instance before the change reaches users.

The effect on local password logins must be verified in the target release. The sources do not document whether accounts that sign in with a local password use the username, the mail address or both after the provider is switched, so do not assume they behave the same as federated logins. Build a small test matrix with one account per provisioning path and one per matching edge case, then attempt each login with the username and with the address. Confirm the result with the release you will run, and check the federation documentation for any change to the matching settings in that version.

When to change the upstream claim instead

If the upstream identity provider can send a stable, unique identifier as the username claim, this is the more durable fix. The openDesk IdP can match users on the claim you configure, so the cleanest result is an upstream claim that does not change when a person marries, changes department or changes mail domain. Ask the upstream team to add or map a claim that holds a fixed account name, and keep the mapping in the federation configuration rather than in individual user records. Changing the claim upstream means openDesk keeps the same username matching for the life of the account.

  • Upstream team change: map a stable account name (for example, a sAMAccountName-style value or a fixed subject identifier) into the username claim sent over OIDC.
  • Verify the claim value: check it for a sample of users in a test realm and confirm the value is identical on every login.
  • Verify uniqueness: confirm no two users can produce the same claim value, including after a rename.
  • Verify existing accounts: confirm which openDesk usernames already exist and whether they match the new claim before switching.
  • Document the mapping: record the claim name in the change log so future upstream changes are reviewed against it.

Before switching, test a login with at least one account from each user population and confirm the resulting openDesk username is the one you expect.

Switching the LDAP provider to mailPrimaryAddress

This sequence moves openDesk from matching upstream usernames to matching e-mail addresses, so federated and local logins line up with the identifiers your identity provider actually sends. Each step ends with a check that tells you whether the change is safe to take to production.

  1. Inventory upstream usernames and existing accounts

    The identity or platform team lists the claim your upstream identity provider sends as the username, then exports the openDesk accounts from the IAM and compares the two lists. Mark every user whose upstream username is an e-mail address, every user whose upstream username is something else, and every openDesk account with no upstream counterpart. Done when each user falls into exactly one of these groups and the team has agreed who owns the unmatched accounts.

  2. Confirm mailPrimaryAddress is unique and populated

    Check that every user who will log in through federation has a value in mailPrimaryAddress, and that no two accounts share the same address, including case-only differences. Duplicates and empty values must be resolved in the source directory before the change, because a matching attribute that is missing or shared will cause logins to fail or to attach to the wrong account. Done when a report from the source directory shows zero missing and zero duplicate addresses for the in-scope population.

  3. Compare mailPrimaryAddress with upstream claims

    Pair each user's mailPrimaryAddress with the claim the upstream provider sends for that user, and record every mismatch, including aliases, changed addresses and different capitalization. Decide per mismatch whether to correct the directory or the upstream claim. Done when the comparison shows that every in-scope user's upstream claim matches exactly one mailPrimaryAddress, and the team has a signed-off list of any exceptions.

  4. Change the matching attribute in a non-production environment

    In a non-production openDesk environment, set the LDAP provider's matching attribute to mailPrimaryAddress, following the federation settings in the openDesk IdP federation documentation for your release. Keep the change in version control so it can be reviewed and reproduced. Done when the configuration is deployed, the IAM shows the new matching attribute, and the change is recorded with the release it was tested on.

  5. Test one federated login and one local login

    Sign in once as a federated user whose upstream username is an e-mail address, and once as a local account that has no upstream identity, then confirm both reach the expected applications and that the session maps to the correct openDesk account. Also check that a second test user with a similar name does not land on the first user's account. Done when both logins succeed, the correct accounts appear in the audit output, and no account was created or merged unexpectedly.

  6. Roll out in production with a rollback plan

    Before the production change, record the current configuration, schedule a window with the people who support sign-in, and agree the criteria for rolling back. Apply the same change, repeat the two test logins and a sample of federated users, and watch for failed sign-ins. Done when the production checks pass and the rollback steps have been written down and rehearsed in the non-production environment, so the team can restore the previous matching attribute without a new build.

Security risks of matching accounts on e-mail addresses

Using e-mail addresses as the matching key links account identity to a mailbox that can be reassigned, renamed or shared. The cards below cover the failure modes that follow from that link and the control to apply to each, so the matching key stays tied to one person.

Account takeover through reused addresses

When an employee leaves and their address is handed to someone else, a federated login matched on that address can land the new holder in the old account, with its files, chats and application rights. Check whether your upstream provider reuses addresses and how long a retired address stays reserved. Apply a stable identifier such as an immutable object ID or employee number as the primary matching key, and keep the e-mail address as a display attribute only.

Aliases resolving to the wrong account

Many organizations expose several addresses per person, such as first.last, a department alias or a legacy domain. If openDesk matches on any of them, an alias can resolve to a different account than the one its owner expects. Inventory the aliases in your directory and decide which attribute is authoritative before the first login. Test matching with a list of known aliases, not only the primary address.

Address changes locking users out or granting access

A renamed address, such as after a marriage or a domain migration, can stop a user from matching their existing account, or it can match a different one. Both outcomes need an owner. Agree who approves an address change, and check how a changed claim is handled before it reaches production. Keep the change in the upstream directory, not as a manual edit in the openDesk IAM.

Admin rights on shared or role mailboxes

A role mailbox such as it-admin@ or a shared inbox can end up as the matching key for a privileged account. Anyone with access to that mailbox could then sign in with administrator rights. Keep the Domain Admins group limited to named individuals, and review every match that touches an administrator account before it is created. Exclude role mailboxes from the matching rules by policy.

Weaker audit trails with unstable keys

If the key that identifies a user changes, log entries written before and after the change point to different identities, and an investigation may not connect them. Record which attribute was used for each federated login, and keep the upstream subject identifier in the logs next to the username. Confirm with your openDesk and identity provider teams which login events are logged and where they are retained.

Two-factor enrollment tied to the wrong identity

Second factors are enrolled against an account, so a mismatched match can attach a new user's authenticator to someone else's account. The enrolled factor then protects the wrong person's data. Enforce 2FA only after identity matching is verified for each user group, starting with administrators. Confirm the enrollment and recovery steps with your team before rollout, because the recovery path also depends on the matched identity.

How to handle accounts that already exist

Reconcile the accounts that already exist before the matching attribute changes. Every account created through federation or the directory import holds an identity taken from the old upstream value, so once the upstream starts sending mailPrimaryAddress, some stored identities will no longer match what arrives at login. Compare each stored openDesk username with the e-mail address the directory holds for the same person. Any mismatch can cause a failed login or a second account, so resolve it before cutover. Flag shared, service and former-staff accounts separately, since many have no matching mailbox. Ask ZenDiS which view of the stored values is most reliable in your release, and export the list from there.

Keep account creation in step with the import. If first-login provisioning fills the gaps, accounts are created from whatever value arrives first, and that route has no deprovisioning and no group sync, so those accounts drift from the directory. Correct the e-mail attributes in the source directory, let the import carry the change across, and only then switch the matching attribute in the federation settings. Ask ZenDiS and check the release notes for how the release treats existing accounts: whether it rematches them to the new value, renames them or leaves them untouched. Do not assume any of these behaviors. Test them on a copy of your environment first. The IdP federation documentation describes the matching options.

Plan the communication before the change, not after the first support call. Tell users which identifier they enter at sign-in, the date the switch takes effect and who to contact if their login fails. Users whose stored identity was not reconciled may need to sign in again or have an administrator correct their account, so know in advance which groups and applications they will reach first. Run the switch with a small pilot group, usually administrators, and keep a record of old and new identifiers so support can find an account by either. Confirm whether active sessions survive the change, because that determines whether users are interrupted during the working day.

Questions teams ask before changing openDesk username matching

Is switching openDesk to e-mail usernames a configuration change or a development project?

In most cases it is a configuration change: the LDAP provider's username attribute is pointed at mailPrimaryAddress instead of the default, and the change is made in the deployment configuration rather than in application code. The work becomes larger when the upstream identity provider cannot send the e-mail address as the claim openDesk matches on, because then the upstream side needs changing too. Confirm the exact configuration keys against the federation documentation for your openDesk release before planning, since the keys depend on the version you run. The openDesk federation guide is the starting point: openDesk federation with external IdP.

What makes the effort to change openDesk username matching grow?

Four factors drive the effort most. The first is the number of identity sources, since each LDAP directory, Active Directory forest or upstream OIDC provider needs its own mapping check. The second is the quality of mailPrimaryAddress: duplicate, empty, aliased or differently cased addresses will block logins or create conflicting accounts. The third is the number of administrator accounts, because local administrators may log in by a username that stops working after the change and must be rehearsed first. The fourth is testing scope, which grows with the number of applications and roles users depend on.

Can our own team change openDesk username matching without outside help?

A team that already runs Kubernetes and Helmfile deployments and has someone who understands the identity setup can usually make the configuration change itself, provided it has a non-production environment to test in. The skills that are harder to staff are directory data cleanup, a tested rollback plan and a structured test of federated and local logins across every application. openDesk requires a CNCF-certified Kubernetes cluster at v1.33 or later, Helm 3.17.3 or later below v4 and Helmfile 1.0.0 or later, so confirm those prerequisites before starting. Check your own capacity against that list and against the upgrade and support model you intend to use.

What do we need from the identity owner and the upstream provider?

The identity owner needs to confirm which attribute holds the canonical e-mail address, whether it is unique and populated for every account that will sign in, and how renames and aliases are handled. The upstream provider team needs to confirm which claim or attribute it sends during OIDC sign-in and whether that value can be changed if the current one does not match. Both teams should agree on a freeze window for directory changes during testing. Ask the upstream provider for a sample token or directory export with a few real account shapes, including shared, former and external accounts, so mismatches surface before go-live.

How long does testing a username matching change usually take?

Duration depends on scope rather than on a fixed figure. Testing grows with the number of identity sources, the number of user populations (employees, contractors, administrators, service accounts) and the number of openDesk applications each population uses. A minimal test covers one sign-in per population through the federated path and one local administrator login. A full test adds data-quality checks on mailPrimaryAddress, rollback rehearsal, and verification that existing sessions and local logins behave as expected after the change. Ask any provider for a written test plan with entry and exit criteria before agreeing a timeline.

What happens to local openDesk logins after switching to e-mail usernames?

Local logins are the part most often missed. Accounts that were created with one username format may no longer match the attribute openDesk now uses, so the same person may appear to have two identities or be unable to sign in. Before the change, list local accounts, including administrators, and record which username each one uses today. Then decide whether to keep local logins as a break-glass path, retire them, or map them to the new value. Confirm the behavior for your release in the openDesk federation documentation rather than assuming it.

When should we bring in a partner for this change?

Bring in a partner when the change depends on an upstream provider you do not control, when directory data quality is unknown, or when the change must be documented for an audit or a public-sector security review. DeployOpen plans, implements, integrates and documents self-hosted open-source platforms inside your own infrastructure, and most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. A quote follows from that written scope, so the fastest route to a number is a short written description of your identity sources, account populations and target environment.

How DeployOpen works on this

DeployOpen plans and implements openDesk inside your own infrastructure, including how upstream identity providers that send e-mail addresses as usernames are matched to openDesk's Keycloak-based IdP. Each change is agreed in writing, built and tested against your login flows, and handed over with documentation your team can run.

How we scope

  • Written scope fixes which identity provider, LDAP provider attribute and login paths are covered before any change starts.
  • The scope records which existing local accounts, the Nubus Directory Importer and federated users are affected by the username change.
  • Engagements are fixed-scope, and a quote follows from the written scope, with ongoing support available as a retainer.

How we build

  • We confirm the username claim your upstream provider sends and compare it with the mailPrimaryAddress attribute in the LDAP provider.
  • Changes are made in your openDesk deployment configuration so they can be reviewed, versioned and repeated across environments.
  • Test logins cover federated users, existing local accounts and administrators before the change goes to production.

How we hand over

  • Documentation records the claim mapping, the attribute used for matching and the steps to roll back the change.
  • Your team receives a list of accounts whose login name changes, so help desk and application owners can prepare communication.
  • We walk your administrators through the change so they can check it after future openDesk releases.

How we support

  • Retesting of login paths is included when you upgrade openDesk or change the upstream identity provider, if the written scope says so.
  • Ongoing support, upgrades and continuous testing are available as retainers for identity changes that follow later releases.
  • Before any future change to the username claim, we re-check federation behavior against the current openDesk documentation.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.