Reputation: 127
I need to get OS username, to send to a .net web api that will make an active directory checking if that user exists there and return the user info. This is for hospital staff, that will use this app in their chrome books, so I need to check if the user who entered the operating system exists in the AD.
Upvotes: 0
Views: 2218
Reputation: 2259
Use the AUTH_USER and/or LOGON_USER server variable. That should do it if it's hosted on IIS. On the backend you could do:
Request.ServerVariables("LOGON_USER")
, but this may be vb.net specific.
See https://msdn.microsoft.com/en-us/library/ms524602(v=vs.90).aspx
Upvotes: 1