In Active Directory (AD), the display names of AD users can be obtained using the Get-ADUser cmdlet . However, using the Get-ADUser cmdlet to retrieve the display name of a specific set of users can prove to be a difficult task because: Minute syntax errors or typographical errors can lead to execution failures.
In Active Directory, the User Principal Name (UPN) attribute is a user identifier for logging in, separate from a Windows domain login. For more, see Microsoft's User Naming Attributes . The format of the UPN attribute at IU is [email protected] .
I'm writing a web application which uses windows authentication and I can happily get the user's login name using something like:
string login = User.Identity.Name.ToString();
But I don't need their login name I want their DisplayName. I've been banging my head for a couple hours now...
Can I access my organisation's AD via a web application?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With