Nordes/IdentityServer4.LdapExtension

Throws an error if UID attribute is not present in Active Directory

Closed this issue · 1 comments

If UID attribute is not present in active directory, below line throws an error as it doesn't find username.

Username = ldapEntry.getAttribute(ActiveDirectoryLdapAttributes.UserName.ToDescriptionString()).StringValue;

There's no magic ;). Usually I would say that you are supposed to know which attributes you have in your AD. That being said, the "username" is a normal attribute in a normal AD. If you are using OpenLdap, it may differ (based on schema).