While adding support for authenticating a user via Active Directory using the user's samAccountName, I accidentally authenticated with the samAccountName in UPN format.
Example: User has UPN of test@mycorp.com the samAccountName is anotherTest
Note that the samAccountName and the UPN are completely different.
When I perform the ldap bind operation with username as anotherTest@mycorp.com, the authentication surprisingly succeeds.
Why does it succeed? Is it valid to bind with a samAccountName in UPN format?
Thanks