Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Windows authenticate, and return LDAP cn and OBJECTSID

Enthusiast ,
Jun 24, 2009 Jun 24, 2009

Hi there CF people:

I want a company member to Windows authenticate and based on the matching user I need a query that coldfusion submits and returns some attributes like the cn and OBJECTSID

I've tried stuff like this but this only returns what the filter wants, I need what I described above.

<cfldap
          server = "myserver"
          action = "query"
          name = "results"
          start = "dc=domain,dc=com"
        
         filter="name="
          attributes = "name,cn,ObjectSid,Current-Location"
         username="Ho\nikos"
               
        password= "secret"
       
            >

Many thanks for any tips

958
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Jun 25, 2009 Jun 25, 2009

Here is what I use...

<cfldap action="QUERY" name="results"
        attributes="name,employeenumber,memberof,title,mail,telephonenumber,givenname,sn,SAMAccountName,l,st,streetaddress,postalcode,physicalDeliveryOfficeName,department"
start="DC=YourDomain,DC=org"
filter="SAMAccountName=#Trim(NameToCheck)#"
server="ldap.YourDomain.org"
username="YourDomain\YourUserName"
password="YourPassword">

Note that your oganization may or may not use cn or OBJECTSID. Add them to the attributes section shown above, an

...
Translate
Engaged ,
Jun 25, 2009 Jun 25, 2009

Here is what I use...

<cfldap action="QUERY" name="results"
        attributes="name,employeenumber,memberof,title,mail,telephonenumber,givenname,sn,SAMAccountName,l,st,streetaddress,postalcode,physicalDeliveryOfficeName,department"
start="DC=YourDomain,DC=org"
filter="SAMAccountName=#Trim(NameToCheck)#"
server="ldap.YourDomain.org"
username="YourDomain\YourUserName"
password="YourPassword">

Note that your oganization may or may not use cn or OBJECTSID. Add them to the attributes section shown above, and then do a CFDUMP to see what happens.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 26, 2009 Jun 26, 2009

Awsome dude you've saved my day

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 26, 2009 Jun 26, 2009

SAMAccountName was what I wanted

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009

I'm trying to figure out how to save the

OBJECTSID

in a readable fromat into ms SQL , could someone give some pointers?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009

returnAsBinary = "objectsid"

seems to fix it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009
LATEST

Maybe it would be better to use objectGUID as I need asometime to reference to that does not change.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources