Why account linking in Zitadel needs a design before the first login
Decide before you configure any provider whether an external login creates a new Zitadel user or joins an existing one. Once users sign in through several identity providers, every external login raises the same question: is this person already known to the system? If the answer is left to defaults, a customer who signs in once with a social account and later with a corporate account can end up with two users, two sets of roles and two sets of audit records. Account linking is the step where Zitadel associates an external identity from a provider with a user it already holds, so that both logins resolve to one account.
Teams usually need linking in three situations: customers who sign in with both a personal social account and a corporate account, migrations where users must keep their existing records while moving to Zitadel, and coexistence periods where another identity provider such as Keycloak or an enterprise directory still holds part of the population. Each situation pushes toward a different choice: create users automatically on first login, prompt the user to link to an existing account, or require an administrator to approve the match. Those choices also determine what happens when a provider is removed, when a user has no local password, and which login method is the fallback.
Do not assume exact linking behavior from general identity concepts. Behavior for automatic creation, linking prompts and matching by email can differ by provider type and by Zitadel version, so confirm each option in the identity provider documentation for your release before you write the design. Record the matching rule, the fallback to local login and the expected audit entries in the design document first. Provider setup then becomes a configuration exercise rather than the place where account identity is decided.
Automatic creation versus linking prompts: which pattern fits
With automatic creation, the first successful external login creates a new Zitadel user from the claims the provider returns, and the user is signed in without an extra step. This is the smoothest path for new customers or partners who have no existing local account, and it avoids asking people to remember which method they used before. The trade-off is that Zitadel has no moment where a person confirms they own an account that already exists, so any earlier local or social account with the same email can end up as a second user.
- User experience: The login completes in one pass, which suits self-service onboarding but gives existing users no chance to attach the new method to their current account.
- Duplicate-account risk: Highest of the two patterns when users previously signed up with a password or a different provider using the same address.
- Trust in the email claim: The provider's email claim decides which account is matched or created, so only rely on it when the provider verifies the address and you have confirmed that behavior for each provider.
- Support load: Usually lower at onboarding, but duplicate accounts generate tickets later when users cannot see their data.
Before relying on this pattern, confirm in your chosen Zitadel version which automatic creation and linking options apply to each provider you plan to connect.",
A linking prompt detects that an external login matches an existing account, then asks the user to confirm the link, usually by signing in again with the existing method. This keeps one user record for each person and makes ownership explicit, at the cost of an extra step that some users will not understand. The design choice is mainly about who must prove ownership and how clearly the prompt explains what will happen.
- User experience: One additional sign-in is required, so the wording of the prompt and the fallback path matter for user trust and completion.
- Duplicate-account risk: Lower, because a second user is not created silently when a match exists.
- Trust in the email claim: Still matters for finding the candidate account, but the user must also prove control of the existing account before the link is made.
- Support load: Higher during rollout, as users ask why they were asked to confirm and what happens to data already stored under each login.
- Verification step: Consider a verified step such as a password or second factor on the existing account, which fits higher-assurance tenants more than consumer sign-up.
Confirm whether your Zitadel version offers prompted linking for each provider, and whether it is configured at instance or organization level, before you design the screens.",
Both patterns depend on the claims a provider returns, and the risk is not the same for every provider. An enterprise identity provider that you or your customer operates usually has managed, verified addresses, while some social providers or self-managed identity providers may allow unverified or reassigned email addresses. Treat the email claim as an input to a decision, not as proof of identity, and decide per provider how much it may influence account matching.
- Provider assurance: Review whether the provider verifies email addresses and whether addresses can be changed or reused by the account holder.
- Claim choice: Compare the stable subject identifier with the email address; the subject is what should anchor the link once it exists.
- Organization scope: Restrict a provider to one customer organization when its domain and governance are known, so a claim from one tenant cannot match users in another.
- Re-verification: Decide whether a later change of email at the provider should update the Zitadel user or trigger another confirmation.
- Documented behavior: Check the provider configuration in your Zitadel version for the claims it uses to match accounts.
Ask the provider owner or your customer to confirm which claims are verified and stable before you accept email as a matching key.
Duplicate accounts are the main operational failure in account linking. They appear when a person signs in with a new method, the system cannot match it to the earlier user, and a second record is created. Preventing this needs decisions made before go-live, and cleaning up after the fact is harder because roles, grants and audit history may already be split across the two records.
- Detection rules: Define how the system matches on verified email, subject identifier or both, and what happens when more than one candidate exists.
- Merge procedure: Agree who may merge two users, how grants and roles move, and how the audit record shows the merge.
- Reporting: Run regular checks for users sharing a verified address across methods, and treat the results as an operations task.
- Communication: Tell users which sign-in method to use going forward and where to request help if they see missing data.
- Test cases: Cover first login, repeat login, changed email and an account that exists under a different provider.
Request a written merge and cleanup procedure from whoever will operate the environment, and test it on a copy of your data before any live users arrive.
Whatever linking pattern you choose, users need a dependable fallback when an external provider is down, misconfigured or no longer trusted, and security teams need one audit trail that shows how each login was matched. A fallback to local login keeps access available but also creates a second path that must be governed, so its scope should be decided with the linking design, not after it.
- Fallback scope: Decide which users may still sign in with local credentials and whether that depends on organization, role or provider status.
- Unified record: Make sure logins through each method are logged against the same Zitadel user, so investigations do not start from two records.
- Link events: Log when a link is created, confirmed, refused or removed, including the provider and the matching claim used.
- Retention: Confirm how long linking and login events are kept in your deployment and whether they meet your own policy.
- Alerting: Watch for unusual link creation, such as many links from one provider in a short period.
Confirm with your Zitadel administrators which events are recorded for each login method and how they can be exported before you set your audit requirements.
Linking configuration options and when each fits
This table compares the main choices for how Zitadel links a social or enterprise identity to one user: automatic creation, linking on verified email, user-initiated linking, local login as the first factor, and restricting a provider to one organization. Read each row for when it fits, what it risks, and what to confirm in the documentation for the Zitadel version you run.
| Option | When it fits | Main risk | What to confirm for your version |
|---|---|---|---|
| Automatic creation at first login | Provider is trusted, users arrive only through it, and you want no sign-up friction | A new account is created even when the same person already has a local user, producing duplicates | Whether the provider's auto-creation and auto-linking settings are available at instance or organization level |
| Linking on matching verified email | Both identities are controlled by you or a trusted partner and email is verified at each provider | Email reuse or unverified addresses can attach an external identity to the wrong account | How Zitadel treats the email verified flag from each provider and whether unverified emails can match |
| User-initiated linking from account settings | Users already have a local account and you want them to confirm the link themselves | Users may forget or skip the step, leaving split accounts that look unrelated in audit logs | Where the linking action appears in the console and login UI and who may trigger it |
| Local login as the required first factor | Accounts must remain reachable if a social or partner provider is down, revoked, or changed | Users who never set a local credential cannot recover access, and a weak local password weakens a linked account | Whether the login policy can require a local factor before external links are accepted |
| Restricting a social provider to one organization | Developer or partner logins should only work for a defined customer or internal organization | If the provider is enabled too broadly, unrelated organizations can accept identities they should not | Scope of each provider at instance versus organization level and how domain routing interacts with it |
| Prefilling or fixing profile data from claims | Provider attributes are reliable and you want fewer profile prompts | Stale or incorrect claims overwrite trusted profile data on later logins | Which claims are mapped on each login and whether updates happen only at first link or on every sign-in |
| Unified audit trail across linked identities | Security and compliance teams need one user history across providers | Logs split by provider identifier unless the link is recorded against one user | Which events record the external identity, the internal user ID and the provider, and how they are exported |
How duplicate accounts happen and how to prevent them
Duplicate accounts usually start with a small mismatch: an unverified email, a different address at a second provider, or a person who already has a local password. Each cause needs its own prevention step, and the checks below should be settled before the first customer signs in.
Unverified email claims
A provider may return an email address that the user never proved they control. If Zitadel links or creates accounts on that address alone, someone can attach their identity to an account that belongs to another person. Before enabling automatic linking, confirm for each provider whether its email claim is marked verified and whether Zitadel's linking logic checks that flag. Where a provider does not send a verified flag, require a linking prompt that asks the user to authenticate to the existing account before the link is stored.
Identity provider docsDifferent emails at each provider
The same person may use a work address at Entra ID, a personal address at Google and a third address in a customer's Okta tenant. Matching on email then sees three people. Decide which stable identifier is the anchor for each provider, such as the subject claim for an OIDC provider or the NameID for a SAML provider, and store that pair as the link key. Document which attributes are informational only, so that a changed mailbox does not create a new user.
Existing local password accounts
Many users already sign in with a password created before the federated provider existed. If the federated login creates a second user with the same address, the person now has two accounts, and roles or audit history stay on the old one. Decide whether the first federated sign-in should prompt the user to confirm the existing password account, and make sure the local login still works if the provider is unavailable. Test this case with real pre-existing users in a staging instance, not only with new test accounts.
The same person in two organizations
A consultant or shared vendor may belong to two customer organizations in one Zitadel instance, each with its own identity provider. Each organization can produce a separate user, which splits the person's access and history. Decide whether the person should be one user with grants in several organizations or separate users per organization, and write that rule down. Changing it later means a merge procedure, so the decision belongs in the design phase.
Merge procedure for existing duplicates
Some duplicates will already exist when linking is introduced, and some will appear after a misconfigured provider runs for a while. Prepare a documented merge procedure before go-live. It should define who approves a merge, how roles and grants from both accounts are reconciled, how the deactivated account is kept for audit, and how the user is told what changed. Test the procedure on a copy of production data before relying on it.
Set up account linking in Zitadel step by step
This sequence takes a Zitadel deployment from a confirmed version and scope model to a tested setup where each external identity attaches to one user record, with local login still available as a fallback.
Confirm the Zitadel version and deployment model
The platform team records the exact Zitadel version, the deployment method (Kubernetes with the official Helm chart, Docker Compose or binaries), the PostgreSQL version, and the public domain and TLS setup. Check the running version against the release notes on GitHub before you build anything, because linking behavior and console screens can change between releases. Done means a short written record exists that a second engineer can reproduce in a non-production environment.
Define the identity model per organization
Decide which customers, partners or business units get their own organization inside the instance, and which users belong to the instance as workforce accounts. For each organization, list the external providers it may use, the verified email domains, and whether local password or passkey login stays enabled. Write down the rule for which identity wins when two providers return the same email address. Done means every organization has a one-page identity profile that the security and product owners have signed off.
Configure each external provider at the chosen scope
Register each social or enterprise provider in Zitadel at the instance or organization level, as your identity model dictates. Confirm the redirect URI on the provider side, the client secret storage, the scopes requested, and the attributes Zitadel reads, especially the verified email claim. Keep providers that only one organization may use at organization scope so they cannot appear for other tenants. Done means each provider completes a test sign-in from the login page and the returned profile shows the expected email and subject identifier.
Set the linking and creation behavior
Choose, per provider and per organization, whether a first external sign-in creates a new user automatically, prompts the user to link to an existing account, or requires an administrator to approve the link. Set the local login fallback so a user who already has a password or passkey can still sign in after a provider is removed. Record the chosen behavior in the identity profile from the previous step. Done means a written decision table exists for each provider, and the configured login policy matches it.
Test with accounts for each provider and an existing local user
Create test accounts for every provider in scope and at least one pre-existing local user whose email matches an external identity. Run the first-login path, the repeat-login path, the link prompt, and a sign-in after the external provider is disabled for that user. Use an illustrative test matrix with one row per account and provider, and record the result of each cell. Done means every row produces the outcome in your decision table, and any mismatch has a ticket with a named owner.
Verify that one user record holds all linked identities
In the Zitadel console or through the management API, open each test user and confirm that every linked external identity appears under that single user, with no second account created for the same person. Check that the audit events for each sign-in reference the same user identifier. Confirm that the linked identities survive a logout, a password reset and a fresh external sign-in. Done means the test report shows one user per person, one entry per linked provider, and consistent audit records across all providers.
How a social or enterprise login reaches one user record
The flow starts when a user picks an external provider on the Zitadel login page. Zitadel receives the identity claims from that provider and checks them against existing users. The outcome is one of three paths: match an existing user and link the external identity, create a new user, or fall back to local login. Each path should end with one user record and an audit event that names the provider used, so teams can confirm that no second account was created.
Possible outcomes for an external login, all ending in one user record and an audit event.
Security and audit considerations for linked identities
Linking a social or enterprise identity to a Zitadel user changes who can sign in as that user. The cards below cover the trust decisions, recovery paths and audit records that determine whether a link stays safe after launch. Each one is something to decide and test before the first customer account is linked.
Trust in provider email claims
Automatic linking often matches an incoming identity to an existing user by email address. That match is only as strong as the provider's verification of the address. Check whether each provider asserts that the email is verified, decide whether unverified addresses may ever link, and document the answer per provider. Treat a provider that does not assert verification as one that must not link on email alone.
Account takeover through weak links
If a user can create an account at a provider with someone else's email address and then link it, the attacker inherits the victim's Zitadel account and its roles. Require a verified email or an explicit confirmation from the existing user before any link is created. Test this path with a provider account you control, using an address that already has a local Zitadel user, and confirm the link is refused or held for confirmation.
Local login and passkeys as recovery
If a linked provider is suspended, changed or locked, users need another way back in. Keep a local password or passkey enrolled for linked users where your policy allows it, and decide who may remove that factor. Passkeys are documented by Zitadel with fallback to password login, so confirm how that fallback behaves for users who have only a federated login. Write the recovery procedure before go-live, not during the first incident.
Zitadel passkeys docsLogging link and unlink events
A link changes the identity that can authenticate as a user, so each creation, change and removal of a linked identity should be recorded with the user, the provider, the time and the actor. Confirm which of these events Zitadel records by default in your version, which fields they contain, and whether unlink actions are captured as completely as link actions. Gaps here make later investigations of account takeover very hard.
Separating administrator and user actions
Links created by a user at login and links created or removed by an administrator have different risk and different accountability. Record the initiating party in each event, so that an administrator's removal of a link is distinguishable from a self-service action. Restrict which administrator roles may unlink identities, and review those grants like any other privileged access.
Confirming audit format and retention
The format, storage location, export options and retention period of Zitadel audit output depend on how your deployment ships and stores logs. Do not assume a retention period from the product name or a previous project. Ask your platform team and DeployOpen to confirm the output format, where events are shipped, who can read them and how long they are kept, and test that a link event can be found from a user's identifier during an exercise.
Questions teams ask about linking accounts in Zitadel
What drives the cost of designing account linking in Zitadel?
The main cost driver is how many identity providers must be linked and how many distinct linking rules they need. Each provider adds a configuration path, a set of attribute mappings, and a test matrix covering new users, existing users, and users who already have a local account with the same email address. Costs also rise when linking must differ by organization, because each organization can use its own identity provider in Zitadel. Cost is one-time for design and build, and recurring only if you retain support for new providers or policy changes. Ask any partner for a quote that lists the providers in scope, the linking behavior for each, the test cases, and who signs off on the design. DeployOpen quotes follow from a written scope, and the Zitadel pricing page on Zitadel pricing covers plan fees, which are separate from implementation work.
How long does a design and test cycle take for account linking?
No duration has been established for this work in this document, so confirm timing against a written scope rather than a generic estimate. The cycle length depends mainly on the number of identity providers, whether each provider is configured at instance level or organization level, and how many existing user populations must be reconciled. A cycle with one or two providers and a single login policy is typically shorter than one that covers several enterprise identity providers with different claim formats and existing local accounts. Ask for a schedule that separates design review, a test pass with sample accounts for each provider, and a retest after fixes.
What does our team need to provide for this work?
The work needs three inputs from your side: identity owners who can decide how a matched account should behave, sample accounts for every provider in scope, and administrator access to each provider so test configurations can be verified. Identity owners settle policy questions such as whether an unverified email may link to an existing account. Sample accounts should include a new user, a returning user, and a user who already exists locally with the same address. Provider admin access lets the team confirm which claims, such as verified email, are sent. Without these, the design stays theoretical and the test results will not reflect your real users.
Can an internal identity team design account linking without outside help?
Yes, a capable internal team can design and test account linking, especially for a single provider with simple rules. The points that usually need experienced review are duplicate account prevention, the fallback path to local login when a provider is unavailable, and keeping a unified audit trail across providers. Internal teams often underestimate the test matrix, which grows with each provider and each organization. A useful check is whether your team can write down the matching rule for every provider and reproduce the outcome for each case in a test environment. If not, an external review of the design and test plan may be a better use of budget than a full build.
Which Zitadel controls help avoid duplicate accounts during linking?
The linking decision is what prevents duplicates, so the design should state explicitly when Zitadel creates a new user and when it links to an existing one. Engineers should verify how each provider reports email addresses, whether the address is verified, and whether the same person can appear under two identifiers. Review the identity provider configuration documentation in Zitadel identity providers for the options each provider supports. Test each path with duplicate-prone accounts before go-live, and record which rule applied so duplicates can be traced later.
When do the Zitadel Enterprise plan's support and pricing terms matter for this project?
Enterprise terms matter when you need contracted support during or after the linking design, or when you plan to run Zitadel with a custom commercial agreement. Zitadel lists an Enterprise plan with custom pricing for self-hosted or cloud deployments, along with custom support agreements and technical account management, according to its pricing page. Free and Pro plans are priced by daily active users, with the Free plan at US$0 per month for 100 daily active users and Pro at US$100 per month including 25,000 daily active users. Plan choice does not change the design work itself, but it does affect who answers support questions after go-live. Compare the plan terms on Zitadel pricing against your expected user numbers and support needs.
Should we keep local login as a fallback when a social or enterprise provider fails?
Keep a local or passkey login path where your risk review allows it, because a provider outage or a revoked provider configuration should not lock out every user. Decide which accounts may use local login, whether it requires multi-factor authentication, and how an administrator removes that path after a provider is restored. Zitadel supports passkeys based on FIDO2 and WebAuthn with fallback to password login, which can serve as a documented recovery path. Test the fallback by simulating a provider failure and confirming that the user reaches the same account and that the audit record shows which method was used.
What DeployOpen confirms before linking goes live
Before any social or enterprise login is linked to an existing Zitadel user, DeployOpen works through the identity model with your team in writing. The first step is to fix which identity provider is trusted for which organization, which instance-level and organization-level providers exist, and which user attributes are allowed to match one account to another. Providers are then configured at the agreed scope, so a Google or Entra ID connection set up for one customer organization does not quietly apply to every tenant. Each provider's callback settings, the linking behavior at first login and the automatic creation rules are recorded as part of the configuration, so reviewers can see what was decided and why.
Testing covers the paths users will actually take. DeployOpen runs first logins for a new user, a returning user with a previously linked identity, a user who signs in with a second provider using the same email address, and a user whose provider is unavailable so that fallback to local login with a password or passkey is exercised. The aim is to confirm that duplicate accounts are not created, that unverified email addresses cannot take over an existing account, and that the fallback path does not bypass the second factor your policy requires. Results are documented with the test cases, the Zitadel version under test and the observed events.
DeployOpen also documents the audit trail for your compliance and security reviewers, including which events are recorded for each link and unlink, where those events are retained and how they are searched. Fees for this work follow from the written scope, which lists the providers, organizations, test paths and documentation deliverables agreed in advance. Confirm with DeployOpen which of these items your scope includes, and confirm with your own security team what evidence format they need before testing starts.
How DeployOpen scopes and delivers account linking work
The sequence turns a linking policy into a written scope, a reviewed design, tested configuration and a handover your team can run without us. Each step closes with a specific output you can check.
Agree the written scope and deliverables
DeployOpen and your team list the identity providers in play, the applications that depend on the user record, and the customer or workforce populations involved. The scope names the linking behavior you want, the deliverables and the systems in which the work happens, such as your Zitadel instance or organization. Scope is agreed in writing before any configuration starts, and the quote follows from that document. The step is done when both parties sign off on the scope and the list of deliverables.
Map identities and matching attributes
The team inventories every identity source that could describe the same person and records which attributes are stable enough to match on. Verified email, provider subject identifiers and employee IDs carry different risks, and the map shows where each one is trusted and where it is not. Your security and identity owners confirm which attributes may be used to link accounts. The output is an identity map that lists each provider, its unique identifier and the rule for matching it to an existing Zitadel user.
Decide linking, prompting and fallback rules
DeployOpen works with your team to choose, per provider and per organization, whether a first social or enterprise login creates a new user, prompts the user to link to an existing account, or falls back to local login with a password or passkey. Each choice includes the conditions under which it applies, such as a verified domain or a confirmed session. The design review checks these rules against the identity map and the duplicate-account cases you want to block. The step closes when the review record lists each rule and its owner.
Configure providers and linking behavior
DeployOpen configures the identity providers, their client registrations and redirect URIs, and the linking behavior agreed in the design review, using the Zitadel instance or organization settings your scope names. Configuration changes are kept in version control where your environment supports it, so each change can be reviewed and reverted. Provider secrets are stored in your chosen secrets mechanism rather than in documentation. The step is done when each provider completes a login against the target instance in a non-production environment.
Test with dedicated test accounts
DeployOpen builds a test matrix that covers new users, existing users with a matching email, users with mismatched or unverified attributes, users who already hold a local password or passkey, and users who try to link a second provider. Test accounts are created for each provider and removed when testing ends. Results are recorded against each case, and any gap is fixed and retested before sign-off. The output is a test report that shows every case, its expected result and its actual result.
Verify the audit trail and duplicate controls
The team confirms that each login, link and account creation event is recorded in a form your security operations team can query, and that the records show which provider was used and which user account it resolved to. DeployOpen also checks that duplicate accounts cannot be created by the cases in the test matrix. Where a log field or event does not appear as expected in your Zitadel version, the gap is documented for your team to confirm with the vendor. The step closes when a sample set of events is reviewed and accepted by your team.
Hand over documentation and runbooks
DeployOpen delivers the linking design, the identity map, the configuration record, the test report and runbooks for adding a provider, handling a failed link and revoking a provider. Your engineers walk through the documents and run one provider addition with DeployOpen observing, so the steps are proven in your hands. The handover is complete when your team has signed off on the documents and the runbooks.
Continue with a retainer for new providers
After handover, your team may ask DeployOpen to add providers, revise linking rules or retest after an upgrade through a retainer. Retainer scope, response expectations and fees are agreed in writing, and they depend on how often provider changes are expected. Each later change follows the same sequence: written scope, design check, configuration, tests and updated documentation. The retainer is in place when the written terms are signed.

