Is there a way to find the username (User Principal Name or samaccountname) of the user who is using my app and is logged into an AD domain? Can we also find which domain is the user connected to programmatically?
dsconfigad -show
command line does display the domain but not the username.
I cannot rely on NSUsername() or NSFullUserName()
functions as user can manually change those.
Any help will be appreciable.