IdentityServer4.Admin icon indicating copy to clipboard operation
IdentityServer4.Admin copied to clipboard

Fix errors when a Windows (AD) user without email or displayName is logging on

Open samuel-regola opened this issue 4 years ago • 0 comments

We tried windows authentication but we ended up with an error when a user with no email and/or display name set.

A simple way to fix this error is included in this PR. Of course, in order to work, you also need to set a value for the email-fallback on the STS appsettings.json

"WindowsAuthConfiguration": {
    "EmailFallback": "[email protected]"
  },

And also you need to switch off the RequireUniqueEmail settings:

"IdentityOptions": {
    "User": {
      "RequireUniqueEmail": false
    }
}

samuel-regola avatar Jul 14 '21 14:07 samuel-regola