Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
nealrobinson
Contributor
Contributor

LDAP Server

Hi,

I am trying to query a linux-based LDAP server with little success. I would first like to retrieve the details of each user. Could someone give me an example of what the sql query would look like?

Structure:

Root DSE

|_______ cn=Users (objectclass = Container)

|________ cn = Joe Bloggs (objectclass= User)

|________ cn = Jim Bloggs (objectclass= User)

|____ attributes e.g. dialPlan,telePhoneNuber

So far I have:

sql select User FROM 'LDAP://10.0.0.3:4000' WHERE objectCategory='Users'

or

sql select User FROM 'LDAP://Root DSE' WHERE objectCategory='Users'

or

sql select User FROM 'LDAP://10.0.0.3:4000' WHERE objectCategory='Container'

Many thanks

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are you using ADsDSOObject? Don't know for your LDAP schema, but for Active Directory I use:

SQL select name FROM 'LDAP://DC=mycompany, DC=com' WHERE objectCategory='person'

Do you have an LDAP browser (like Softerra) that you can use to confirm the attribute and objectCategory name you are using? "Select User" doesn't look right to me. User is the class, it's unlikely to also be an attribute name. How about

sql select name, dialPlan FROM 'LDAP://10.0.0.3:4000' WHERE objectClass='User'

-Rob

nealrobinson
Contributor
Contributor
Author

Thanks for the reply. Yes I am using ADsDSOObject. I tried what you sent me and it did not work. I did change name to cn as there was no name key.

I keep getting this error emailed to me from the server:
LDAPMessage::GetMsg: unexpected tag 0x05
My sql sting: sql select cn, dialPlan FROM 'LDAP://10.0.0.3:4000' WHERE objectClass='User'

Path to User details: frog --> cn=Users --> cn=Joe Bloggs (objectclass=User) --> dialPlan

Not applicable

Hello,

Must the structure of the AD be the same if i were to query more than 2 ADs servers?

I noticed my 4 AD servers are maintain differently, they do not use the same strucutre, for that, will the code still work? or i need to create different query to query each different servers?

Thanks.

Not applicable

another weird thing i noticed is that, says i have AD1 and AD2

AD1 has user ABC
AD2 has user xyz

when i execute the activedirectoryload.qvw, ABC is able to load only AD1 users, and vice versa for AD2.

i'm not able to query users in AD2 if i log in by user ABC.

if you are aware of any causes, please share...

thanks.

qlikviewforum
Creator II
Creator II

Hi,

The QVW which tries to load the data from LDAP loads only the partial data frequently. We are unable to find the root cause of the issue as the QVW doesn't fails but it loads only the partial data.Can someone please help us to identify the root cause of the issue. It has been happening from quite a long time but we didn't succeed in finding the root cause of the issue. Hope someone can help us for the same.

Regards,

qvforum