Skip to main content
Inspiring
September 17, 2012
Question

how to get windows username

  • September 17, 2012
  • 2 replies
  • 2100 views

Hi All,

I need to have the windows username to check whether he is an internal user or an external user to our application.

We are using LDAP authentication for our application; is there anyway to get the windows username in coldfusion?

I checked some blogs and site to use #cgi.auth_user#, but its not working;

I use Coldfusion 9.0 and Apache 2.2.

Any inputs are appreciated.

    This topic has been closed for replies.

    2 replies

    Inspiring
    September 17, 2012

    Unless you are using WIndows Authentication in IIS for the website, I don't think that you will see information in that cgi variable.  There is no way, without using a browser plug-in, to find the info about the client.  it is outside of the javascript sandbox.  Even if you use WIndows authentication, I'm pretty sure that it is not guananteed to be in the cgi var - firewalls can and do filter out that data.

    -reed

    Inspiring
    September 17, 2012

    In what way is cgi.auth_user not working?