From the notebook

Microsoft Entra External ID Username Sign-In Guide

Enable Microsoft Entra External ID username sign-in safely: map aliases, pilot customer IDs, validate claims, monitor failures, and roll back cleanly.

MUA
MU.A
Microsoft 365 / Entra Engineer
Published
17 min read

Microsoft Entra External ID username sign-in lets a customer use a tenant-local username, member ID, or account number with the same password-backed account they already use with an email address. Enable Username in the external tenant's sign-in identifier policy, add a unique username identity to each intended email-and-password customer, and test both identifiers through the application's real user flow.

That is the short answer. The operational answer needs three boundaries. A username is another way to locate the same directory user; it is not a second account. The tenant policy decides whether Entra accepts that identity type at sign-in. And the value surfaced in preferred_username can change according to what the customer entered, so an application must not use that claim as an immutable database or authorization key.

Grab a coffee before importing ten years of loyalty numbers. Microsoft lists sign-in with username or alias as generally available for External ID, but self-service collection of usernames during sign-up and custom-extension-driven username assignment are still marked preview in the current implementation guide. This article keeps the GA administrator-assigned sign-in path separate from those preview onboarding paths. (Microsoft Entra releases and announcements, username and alias implementation guide)

Microsoft Entra External ID username sign-in: the control plane

Four objects decide whether a username works:

  1. The external tenant owns the customer account and local credentials.
  2. The user's identities[] collection maps sign-in types such as emailAddress, userName, and the tenant-generated userPrincipalName to the same user object.
  3. The sign-in identifier policy determines whether the tenant accepts Username during authentication.
  4. The user flow and application provide the browser-delegated or native sign-in journey in which the customer enters the identifier.

All four must line up. Adding userName to a customer does not override the tenant policy. Enabling Username in the policy does not create usernames for existing customers. A user flow does not invent an identity mapping, and a successful mapping does not grant application access by itself.

Microsoft's current alias sign-in guide makes the dependency explicit: the identities[] value can exist while the sign-in attempt still fails because Username is disabled in policy. Keep that model in the change record; it prevents the service desk from treating every failure as a bad password.

An alias does not create a second principal

The customer keeps one Entra user object and one object ID. Email and username are alternative local-account identities associated with it. Group membership, application assignments, authentication state, and profile data remain attached to that user object.

Microsoft Graph models each sign-in identity with an issuer, an issuer-assigned ID, and a sign-in type. For userName, the issuer-assigned ID is the visible username. Microsoft requires the issuer plus issuer-assigned ID combination to be unique in the organization, limits the value to 64 characters, and permits an initial alphanumeric character followed by alphanumeric characters, hyphens, or underscores. (objectIdentity reference)

Do not confuse this customer username with:

  • the tenant-generated user principal name used to represent the directory object;
  • the customer's email address or mail profile property;
  • a workforce-tenant alternate login ID;
  • a social or federated identity from another provider; or
  • an application-specific display name.

The site's Microsoft Entra External ID JIT password migration guide covers moving legacy password validation into External ID. Username sign-in solves identifier choice after the customer exists; it does not migrate or validate a legacy password on its own.

Separate GA sign-in from preview sign-up

The current support boundary is easy to blur because Microsoft documents both paths on one page.

Capability Current state Operational meaning
Administrator creates or updates an email-and-password customer with a username Generally available Suitable for a controlled production pilot after normal validation
Customer signs in with either assigned email address or username Generally available Tenant policy must enable Username
User flow collects a username during self-service sign-up Preview Requires explicit preview acceptance and separate testing
Custom extension prefills, assigns, modifies, or validates a username during sign-up Preview Adds customer-hosted code and preview event behavior to the sign-up path

Do not use a preview sign-up feature merely to make the GA sign-in feature easier to populate. A production team can assign usernames through an approved administrative or provisioning process, retain email sign-in, and postpone self-service username collection until its preview risk is acceptable.

Microsoft has not announced mandatory enablement, a default-on conversion of customer accounts, or a retirement date for email sign-in. This is an administrator-selected capability, not an enforcement event.

Confirm prerequisites, roles, and billing

Microsoft's implementation guide requires:

  • a Microsoft Entra external tenant;
  • a registered application;
  • a sign-up and sign-in user flow; and
  • the application associated with that user flow.

The administrator enabling Username or adding it through the documented portal path needs at least Authentication Policy Administrator. Customizing the identifier-field hint through company branding requires Organizational Branding Administrator. Keep those duties separate when one team owns authentication policy and another owns customer-facing content.

External ID uses a monthly active user billing model for interactive customer sign-ins, and the external tenant must be linked to an Azure subscription. Microsoft does not list username sign-in as a separate premium add-on. SMS MFA, machine-to-machine authentication, and other add-ons retain their own meters. Verify current terms in the External ID pricing and billing overview rather than treating a new identifier as a new licensed user.

The External ID user-flow guide distinguishes email-with-password, email one-time passcode, social, and federated methods. Username alias sign-in applies to customers with email and password accounts. Microsoft says a username can be added to an existing external user only when that user already has an email-and-password account. Do not bulk-add usernames to OTP-only, social, or federated accounts and assume the local password path now exists.

Design the username contract before enabling policy

A durable alias is a data-governance decision before it is an identity setting. Write a contract that answers:

  • Which system is authoritative for the username?
  • Is the value a customer-chosen handle, loyalty ID, policy number, employee-of-customer ID, or generated opaque value?
  • Can it change, be merged, or be recycled?
  • Is it globally unique across the external tenant?
  • Is it safe to display in sign-in pages, help-desk records, and logs?
  • What happens when the upstream account is closed and later recreated?
  • Which team approves corrections and resolves duplicates?
  • What is the rollback identifier when the username is wrong?

Avoid values that disclose sensitive account facts. A sign-in identifier is entered on a public authentication surface and can appear in operational telemetry. Do not turn a government identifier, full financial account number, health-plan number, or another regulated value into a username merely because it is unique.

Reconcile three validation layers

Microsoft exposes a default sign-in-policy regular expression or up to two custom patterns. If either custom pattern matches, the policy considers the value valid. Microsoft warns that it does not validate the logic of a custom expression beyond preventing an email-address pattern; an invalid expression can fail only at runtime.

That policy layer is not the only validation. The Graph objectIdentity contract separately restricts the shape and length of a userName issuer-assigned ID. If preview self-service sign-up is used, its page-layout validationRegEx becomes a third layer. Microsoft explicitly warns that a username can pass sign-up validation but later fail authentication when the sign-up and sign-in-policy expressions disagree.

Use one version-controlled specification and generate every supported expression from it. Test boundary length, upper and lower case, leading character, hyphen, underscore, Unicode, whitespace, email-like values, and duplicates. Do not copy an expression from a front-end form and assume its syntax and anchoring behave identically in every control plane.

Pilot username sign-in in six rings

Ring 0: inventory the current account model

Export a read-only inventory of pilot customers with stable Entra object ID, existing identities[], email address, account type, application, and user flow. Record the current sign-in-policy state and the exact applications using the user flow.

Query by email identity and explicitly request the identity collection, as Microsoft's guide demonstrates:

GET https://graph.microsoft.com/v1.0/users?$select=displayName,id,identities&$filter=identities/any(c:c/issuerAssignedId eq 'customer@example.com' and c/issuer eq 'contoso.onmicrosoft.com')

Replace the sample tenant and customer values. Treat an empty or multi-object result as a stop condition. Do not guess which record should receive the username.

Ring 1: create one dedicated pilot customer

In the external tenant, open Entra ID > Users > New user > Create external user. Add both the Email and User Name identities and set the email profile property. Use a dedicated non-production customer and a low-impact application.

Record the returned Entra object ID, the tenant issuer, the exact email and username identities, and the expected application. Confirm that the username is absent from every other customer before proceeding.

Ring 2: enable Username in policy

Open Entra ID > External Identities > Sign-in identifiers or Entra ID > Authentication methods > Sign-in identifiers. Enable Username with the approved default or custom expression, then save.

Keep email address enabled for the pilot. The goal is to add a second path to the same account, not to make the original recovery identifier disappear.

Ring 3: test both identifiers through the user flow

Run the associated user flow with the pilot application. Microsoft's user-flow testing guide requires an associated application and redirect URI and lets the administrator choose the application, reply URL, response type, scopes, PKCE options, and locale.

Test at least:

  • username plus correct password;
  • email address plus the same password;
  • unknown username;
  • known username plus wrong password;
  • a username rejected by the policy expression;
  • mixed-case input when the source system has case-sensitive business IDs;
  • password reset and account recovery from both starting identifiers;
  • browser-delegated and native application paths, when both are used; and
  • every supported locale and customer-facing identifier label.

The mail or email identity still needs to support communications and recovery according to the application's design. Do not replace a verified email address with a non-routable username in a profile field just to make the sign-in screen look consistent.

Ring 4: validate claims and application correlation

Microsoft says preferred_username contains the email address when the customer enters email and the username when the customer enters username. The claim is human-readable and mutable. Microsoft's ID token claims reference says it must not be used for authorization; use immutable subject identifiers instead.

Check the application for these failure patterns before expanding:

  • database lookup keyed only by preferred_username or email;
  • a second local profile created when preferred_username changes;
  • authorization rules comparing a username string;
  • audit correlation that loses the stable Entra object ID;
  • token caches partitioned by the visible identifier; and
  • customer communications sent to preferred_username as though it were always an email address.

Use oid plus tenant context for a tenant-wide durable object correlation, or the application-specific sub where pairwise subject semantics are intended. Keep the visible identifier as display or search data. The site's access-token and refresh-token guide explains why token identity, session state, and application authorization must remain separate.

Ring 5: backfill existing customers safely

For a small cohort, retrieve each user's full current identities[] collection immediately before the write. Microsoft Graph treats an update to identities as replacement of the entire collection, and the current API reference requires the userPrincipalName identity to remain in that collection. Omitting an existing email, UPN, social, or federated identity can break a working sign-in path. (Update user API)

Use the documented PATCH /users/{id} update operation, the least-privileged permission supported for identity management, and an idempotent job that:

  1. reads the user by immutable object ID;
  2. verifies the expected email-and-password identity still exists;
  3. rejects duplicate or malformed usernames;
  4. preserves every approved existing identity;
  5. adds exactly one userName identity;
  6. writes the full intended collection;
  7. reads it back; and
  8. tests both sign-in paths before moving to the next cohort.

The current API reference lists User.ManageIdentities.All as the least-privileged application permission for user identity updates. Keep the provisioning application separate from customer-facing clients, use short-lived credentials or workload identity, and monitor its writes.

Ring 6: expand by application and customer cohort

Increase scope only when sign-in success, wrong-identifier errors, account recovery, app correlation, and support volume remain within the approved thresholds. Expand by application and source-data cohort rather than by an arbitrary customer count; two million clean generated IDs are less risky than five hundred manually maintained identifiers with duplicates and recycled values.

If preview self-service sign-up is approved later, launch it as a separate change. Test username uniqueness, page-layout validation, sign-in-policy compatibility, custom-extension availability, and failed sign-up recovery without treating the GA administrative pilot as evidence for the preview path.

Monitor the new sign-in path

Use Entra sign-in logs to confirm the customer, client application, target resource, status, authentication details, Conditional Access result, correlation ID, and timestamp. Microsoft's sign-in activity reference organizes the evidence as who, how, and what; keep that sequence when a ticket says only “my member ID does not work.”

Track at least:

  • successful and failed pilot sign-ins by application;
  • invalid-identifier versus invalid-credential outcomes where the supported logs distinguish them;
  • password reset and account-recovery completion;
  • username-assignment successes, rejections, and duplicates;
  • changes to the sign-in identifier policy;
  • user identity updates and their initiating actor or application;
  • unexpected changes in application profile creation or account linking; and
  • help-desk contacts by rollout cohort and locale.

External ID stores sign-in and audit logs for the documented retention period, and Microsoft recommends exporting them through Azure Monitor when longer retention, alerting, or correlation is required. The External ID security-operations guide specifically recommends alerting on excessive authentication failures. Keep usernames out of broad operational dashboards when a pseudonymous object ID or hashed cohort key is enough.

The site's branding themes rollout guide explains the separate presentation layer. If the field still says “Email address” after Username is enabled, fix the identifier hint and localized text; do not change authentication policy merely to compensate for a misleading label.

Troubleshoot in dependency order

The username is stored, but sign-in fails

Confirm the account is an external-tenant email-and-password customer, the userName identity is on the intended user, Username is enabled in the tenant policy, and the input matches the active expression. Then run the exact application's user flow and inspect the matching sign-in event.

Do not reset the password until email sign-in with that same password has been tested. If email works and username does not, the failure is probably in identity resolution or policy, not credential validation.

The policy accepts the format, but assignment fails

Check the objectIdentity rules: length, initial character, permitted characters, issuer, and uniqueness. The policy expression controls what the sign-in experience accepts; it does not remove Graph's identity-object validation.

A customer can sign in with email but not username

Compare the exact tenant issuer and issuer-assigned ID on the user. Verify that the portal session and application use the same external tenant. Confirm that the app is associated with the tested user flow and that the user flow reaches the intended .ciamlogin.com tenant endpoints.

Adding a username removed another sign-in method

Stop the provisioning job. Retrieve the current user and the pre-change snapshot, then restore the approved complete identity collection through a controlled Graph update. Because identities[] is replace-all, a partial payload can remove a valid identity even when the new username itself is correct.

The application created a duplicate customer profile

Inspect which claim the application uses as its local key. If it keys by email or preferred_username, change the account-linking logic to the stable Entra subject before expanding. Reconcile duplicate application data according to the application's data-governance process; do not delete an Entra customer merely to hide a downstream correlation defect.

Existing usernames fail after a regex change

Restore the last approved sign-in-policy expression and retest known boundary accounts. Compare every assigned username against both the old and proposed patterns before reapplying. A policy change can strand accounts without changing their stored identity values.

Sign-up accepts a username that sign-in rejects

If the preview sign-up path is enabled, compare its validationRegEx with the sign-in identifier policy and the Graph identity constraints. Microsoft explicitly documents this mismatch as a runtime failure. Hold new sign-up, correct the expressions, and test the previously accepted value before resuming.

Roll back without damaging customer identities

The safest first rollback is to disable Username in the sign-in identifier policy while keeping email sign-in enabled. That removes the alias authentication path without deleting the customer or changing the password. Notify the pilot cohort to use email, verify the original user flow, and retain the username-to-object reconciliation file until the incident closes.

Do not immediately remove usernames in bulk. A Graph identity update replaces the entire collection, so rollback writes can cause more damage than a policy-level containment. If stored usernames must later be removed, read each current collection, preserve every approved remaining identity, write by immutable object ID, and verify email sign-in after every cohort.

Rollback cannot repair an application that persisted the username as its primary key. That application needs a separate data migration back to stable Entra subject identifiers. Keep policy containment, directory cleanup, and application-data remediation as three distinct workstreams.

Escalate to Microsoft with the tenant ID and type, user object ID, application ID, user-flow name, timestamp in UTC, correlation and request IDs, policy state, sanitized identity types, and expected versus actual outcome. Do not send passwords, tokens, full customer identifiers, or regulated business IDs in an ordinary support transcript.

Microsoft Entra External ID username sign-in checklist

  • Confirm the target is an External ID external tenant.
  • Record GA status for assigned username sign-in and preview status for self-service username sign-up.
  • Confirm the application, redirect URI, user flow, and app-to-flow association.
  • Use Authentication Policy Administrator for the documented portal change.
  • Define a non-sensitive, unique, non-recycled username contract.
  • Reconcile Graph character and length rules with every regex layer.
  • Inventory each pilot user's full identity collection by immutable object ID.
  • Create one dedicated email-and-password customer with both identifiers.
  • Keep email sign-in enabled as the pilot recovery path.
  • Test email and username through the real application user flow.
  • Verify preferred_username is not used for authorization or durable correlation.
  • Preserve the complete identities[] collection during Graph updates.
  • Read back every identity update and test both sign-in paths.
  • Monitor sign-in, audit, provisioning, recovery, and support evidence.
  • Export logs through Azure Monitor when longer retention is required.
  • Define policy containment, directory cleanup, and app-data rollback separately.

Frequently asked questions

Can the customer still sign in with email?

Yes. Microsoft documents username as an additional sign-in identifier for an email-and-password customer. Keep email enabled and present on the user during rollout unless a separately validated design requires otherwise.

Does assigning a username create another customer account?

No. The username is another identity in the existing user's identities[] collection. Use the same Entra object ID to correlate the customer.

Can username sign-in be used for social or email-OTP accounts?

Microsoft's current portal procedure limits adding a username to existing customers with email-and-password accounts. Do not infer a local password identity for OTP-only, social, or federated customers.

Should the application store preferred_username as its customer key?

No. Microsoft describes preferred_username as mutable and unsuitable for authorization. Use the stable object or subject identifier appropriate to the application's tenancy model.

Is self-service username sign-up generally available too?

No. The current implementation guide marks collecting a username during self-service sign-up, and custom-extension-driven prefill or assignment, as preview. Treat those as a separate rollout decision.

References

About the author

MUA

MU.AMicrosoft 365 / Entra Engineer

MU.A is the editorial byline for Sentinel Identity, covering Microsoft Entra, Microsoft 365, and identity administration. Send corrections or questions through the contact page.

Feedback

Was this article helpful?

Anonymous — no account or comment required.

Send detailed feedback

Related reading