Return to Snippet

Revision: 34515
at October 23, 2010 10:02 by buzzedword


Updated Code
sLdapReaderUsername = "RemoteDomain\user"
    sLdapReaderPassword = "password"

    
' Retrieve authenticated user
    strUsername = split(Request.ServerVariables("LOGON_USER"),"\")(1)
    Debug Request.ServerVariables("LOGON_USER") & " - should be of the form DOMAIN\username - if blank, your IIS probably allows anonymous access to this file."
    
    Set rootDSE = GetObject("LDAP://RemoteDC/RootDSE")
    Set oConn = CreateObject("ADODB.Connection")

    sDomainContainer = rootDSE.Get("defaultNamingContext")
    Debug "DomainContainer: " & sDomainContainer

    oConn.Provider = "ADSDSOObject"
    oConn.properties("user id") = sLdapReaderUsername
    oConn.properties("password") = sLdapReaderPassword
    oConn.Open "ADs Provider"

Revision: 34514
at October 23, 2010 10:00 by buzzedword


Initial Code
sLdapReaderUsername = "FQN\user"
    sLdapReaderPassword = "password"

    
' Retrieve authenticated user
    strUsername = split(Request.ServerVariables("LOGON_USER"),"\")(1)
    Debug Request.ServerVariables("LOGON_USER") & " - should be of the form DOMAIN\username - if blank, your IIS probably allows anonymous access to this file."
    
    Set rootDSE = GetObject("LDAP://RemoteDC/RootDSE")
    Set oConn = CreateObject("ADODB.Connection")

    sDomainContainer = rootDSE.Get("defaultNamingContext")
    Debug "DomainContainer: " & sDomainContainer

    oConn.Provider = "ADSDSOObject"
    oConn.properties("user id") = sLdapReaderUsername
    oConn.properties("password") = sLdapReaderPassword
    oConn.Open "ADs Provider"

Initial URL


Initial Description


Initial Title
Zendesk Remote SSO

Initial Tags


Initial Language
ASP