All Apps and Add-ons

Splunk Support for Active Directory: After running an ldapsearch, why does accountExpires or Enabled properties not populating data?

sfefcu
Path Finder

Using Splunk Support for Active Directory 2.1.3.

When we run an ldapsearch to get accountExpires or Enabled properties, no data comes back. When we run a similar search using PowerShell on Active Directory, a value such as "9223372036854775807" for accountExpires and (True or False) for Enabled is returned. My search is below:

| ldapsearch search="(&(objectClass=user)(!(objectClass=computer)))" attrs="sAMAccountName,accountExpires,Enabled"
| table sAMAccountName,accountExpires,Enabled

Any help would be appreciated.

Thanks!

0 Karma
1 Solution

sfefcu
Path Finder

I was able to resolve this issue and since no one posted an answer I'll write what I found.

It turns out that accountExpires and Enabled and not true LDAP attributes, but part of the Win32_UserAccount class. It can be accessed via WMI and Powershell commands easily, but since they are not true LDAP attributes ldapsearch won't bring in those objects. This information can be obtained through the Splunk TA for Windows infrastructure or imported via csv file produced from a PowerShell output.

View solution in original post

sfefcu
Path Finder

I was able to resolve this issue and since no one posted an answer I'll write what I found.

It turns out that accountExpires and Enabled and not true LDAP attributes, but part of the Win32_UserAccount class. It can be accessed via WMI and Powershell commands easily, but since they are not true LDAP attributes ldapsearch won't bring in those objects. This information can be obtained through the Splunk TA for Windows infrastructure or imported via csv file produced from a PowerShell output.

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...