Linking Microsoft Entra sign-ins to local accounts in ASP.NET Core
- Mar 15, 2026
Microsoft Entra ID answers “Who signed in?” but your app still needs to work out which local account belongs to that person.
An email address is useful for sending an invitation, but it’s a poor key for matching a sign-in to a local account. Email addresses can be changed or reassigned, and in Entra ID, the email claim isn’t guaranteed to be verified. An administrator in any tenant can set a user’s email attribute to an address they don’t own.
The OpenID Connect spec has long warned that claims like email aren’t stable identifiers. In 2023, Microsoft documented an account-takeover risk in applications that trusted the email claim to identify users. Entra correctly identified who signed in, but the application used the email claim to give them access to someone else’s account.
The examples below apply to ASP.NET Core, but the principles apply to any stack.
