My technical memo on Microsoft Dynamics 365 for Finance and Operations (formerly AX)
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
string userName =
System.Security.Principal.WindowsIdentity.GetCurrent().Name
;