Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get nt user info using asp and adsi 2

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
hello there

I was wondering if anyone knew how to access specific nt user data from asp(or ms outlook data)?
for example, i have an asp page which gets the user's nt login but i also need what department he or she is from.
Any help would be greatly appreciated.

Thanks
 
Would this help. I call it WhoAmI.asp

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<html>
<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot; link=&quot;#346969&quot; vlink=&quot;#006666&quot; alink=&quot;#FFCC00&quot;>
<h1>ACCESS TESTER</h1>
<pre>
<%

' Prevent caching
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader &quot;cache-control&quot;, &quot;must-revalidate&quot;
Response.AddHeader &quot;cache-control&quot;, &quot;private&quot;
Response.AddHeader &quot;pragma&quot;, &quot;no-cache&quot;

sub WriteVar(byval aVar)
Response.Write( aVar & &quot; : &quot; & Request.ServerVariables(aVar) & &quot;<br>&quot;)
end sub

WriteVar(&quot;AUTH_PASSWORD&quot;)
WriteVar(&quot;AUTH_USER&quot;)
WriteVar(&quot;AUTH_TYPE&quot;)
WriteVar(&quot;SERVER_NAME&quot;)
WriteVar(&quot;LOGON_USER&quot;)
WriteVar(&quot;REMOTE_USER&quot;)
WriteVar(&quot;ALL_HTTP&quot;)
%>

</pre>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top