0

I am trying to display the username of the current user on my client side Vue.js application. The app itself is meant to be internal and would be hosted on an IIS server. I would like to be able to access the current user to display the current users name but also to limit access to the app itself.

Thanks.

Rachid O
  • 13,013
  • 15
  • 66
  • 92
  • Have you tried anything so far? Using a ldap-client like https://www.npmjs.com/package/activedirectory seems the easiest way to auth against an existing AD – discolor Jun 08 '20 at 14:36

1 Answers1

0

You can achieve this by enabling Windows authentication and set your website as local intranet so when user access the website, web browser will send current AD user to trusted intranet automatically. You could also get username from {AUTH_USER}. Without windows authentication, IIS can never get current AD user from client side.

Please remember to enable Automatic logon only in Intranet zone in IE->internet option->Local intranet->custom level...

samwu
  • 3,857
  • 3
  • 11
  • 25