All Apps and Add-ons

Why is my ldapsearch command search not returning certain attributes such as "employeeID"?

zanb
Path Finder

Hello Splunk friends,

I'm trying to use ldapsearch to ingest certain attributes into an index. Currently some attributes, such as employeeID are not being returned. I've tried the following searches:

| ldapsearch search="(&(objectClass=user)(!(objectClass=computer)))" attrs="employeeID"

or

| ldapsearch domain=MYDOMAIN.COM search="(objectclass=user)" basedn="DC=sub,DC=domain,DC=mydomain,DC=com" attrs="name,cn,givenName,displayName,sn,title,employeeID,departmentNumber,dNSHostName,description,objectClass,primaryGroupID,pwdLastSet,whenCreated,whenChanged,lastLogonTimestamp,logonCount,lockoutTime,badPasswordTime,accountExpires"
| table name, cn, givenName, displayName, sn, title, employeeID, departmentNumber, dNSHostName, description, objectClass, primaryGroupID, pwdLastSet, whenCreated, whenChanged, lastLogonTimestamp, logonCount, lockoutTime, badPasswordTime, accountExpires

I've also tried "domain=default" and excluding the domain.

When I run ldapsearch from my own computer or from a server, it returns these attributes just fine. I checked ldap.conf and I also checked the Splunk Supporting Add-on for Active Directory (SA-ldapsearch) config test connection and it all seems to work OK. I read up on the Global Catalog, but I'm not familiar Active Directory.

I've done a lot of searches on Google and this website but I can't seem to find any information that's getting me on the right path to a solution. Would any of you please give me some advice?

Thank you!
Z

0 Karma
1 Solution

zanb
Path Finder

I found out a possible solution. I changed the LDAP port to connect to the local domain: "389". I am now able to look up these attributes.

View solution in original post

zanb
Path Finder

I found out a possible solution. I changed the LDAP port to connect to the local domain: "389". I am now able to look up these attributes.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...