How to get Window User Login Name
We would like to get the windows user id who logs in PC and access the Pega application for example:- Domain/UserID
Basically we need to avoid the login screen while doing LDAP authentication so we need to get the user id from logged in machine.
i tried below methods but they are returning the user account details of Pega server where it's hosted.
System.getProperty("user.name"); System.getenv("USERNAME"); String userName = new com.sun.security.auth.module.NTSystem().getName()