UserPrincipal.FindByIdentity usage
See original GitHub issueDear Sirs,
At the moment, ABP queries LDAP for any identity type. Unfortunately, this may cause problems. As stated here:
The identity of the user principal. This parameter can be any format that is contained in the IdentityType enumeration. But as stated here, if identity type is not specified name attribute will be searched as well. Unfortunately, name attribute in LDAP is not unique and You can get exception
System.DirectoryServices.AccountManagement.MultipleMatchesException: Multiple principals contain a matching Identity.
. So, method with signature containing IdentityType should be used with identity typesSamAccountName
andUserPrincipalName
.
Sorry, I will not be able to supply an example, as not only ABP code is necessary to recreate this situation, but LDAP server as well. To recreate this, You need to have LDAP server, where two different users have the same “Name” attribute value.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
BTW, You made this ticket closed, so I do not think anybody will take another look 😃
Thanks.