How do you transform a upn name like "[email protected]" to the corresponding NT account name, which is frequently "EXAMPLE\user"? In the domains I'm familiar with, I can take the first part after the '@' sign, but I'm concerned that this is not guaranteed to be correct. Do I have to run an ldap query? Would it be a property on the user's DirectoryEntry if I did?
I'm trying to do this in C#, but I'd welcome any pointers or corrections to my terminology.
Thanks