Zendesk Remote SSO


/ Published in: ASP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. sLdapReaderUsername = "RemoteDomain\user"
  2. sLdapReaderPassword = "password"
  3.  
  4.  
  5. ' Retrieve authenticated user
  6. strUsername = split(Request.ServerVariables("LOGON_USER"),"\")(1)
  7. Debug Request.ServerVariables("LOGON_USER") & " - should be of the form DOMAIN\username - if blank, your IIS probably allows anonymous access to this file."
  8.  
  9. Set rootDSE = GetObject("LDAP://RemoteDC/RootDSE")
  10. Set oConn = CreateObject("ADODB.Connection")
  11.  
  12. sDomainContainer = rootDSE.Get("defaultNamingContext")
  13. Debug "DomainContainer: " & sDomainContainer
  14.  
  15. oConn.Provider = "ADSDSOObject"
  16. oConn.properties("user id") = sLdapReaderUsername
  17. oConn.properties("password") = sLdapReaderPassword
  18. oConn.Open "ADs Provider"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.