How to get the Fullname of the Windows User?

Hi All,

Let assume the system user login id is “ui2” and the full name of the User is “UiPath Pro”.

When I use GetEnvironmentVariable or Environment(“Username”) I am getting “ui2” but I need result as “UiPath Pro”.

How can i get this?

Not sure if it works,but just googled

You should use UserPrincipal.DisplayName:

To do so, you’ll need to and add a reference to System.DirectoryServices.AccountManagement.dll from your project.

Hi Thanks for your help. Please let me know how to add DLL (System.DirectoryServices.AccountManagement.dll) into UiPath Project?

This link will guide you how to add custom or externa DLL into UiPath.


displaynameWindows.xaml (5.8 KB)