Alexandre Ribeiro
Alexandre Ribeiro

Reputation: 127

How can I get OS user name with angular 6

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

Answers (1)

jason
jason

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

Related Questions