Splunk Search

How to get LDAP group name by using query or REST API?

viswanathsd
Path Finder
 
Labels (1)
Tags (1)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi viswanathsd,

try this REST API query:

| rest /services/authentication/providers/LDAP | table "eai:acl.app" groupBaseDN host title

cheers, MuS

View solution in original post

MuS
SplunkTrust
SplunkTrust

Hi viswanathsd,

try this REST API query:

| rest /services/authentication/providers/LDAP | table "eai:acl.app" groupBaseDN host title

cheers, MuS

bjarnedein
Explorer

Hi MuS,

Thanks for your speedy response, and currently our [ldap] is the like:

ldap allow_multiple_matching_users 1
ldap max_mem_usage_mb 3000
ldap max_users_to_precache 30000

What I think is the interesting thing here is that when using ldapsearch we can get up till 10,000 rows.

I can't find any other key/values for the [ldap] stanza, do you know of any?

Cheers, Bjarne

0 Karma

shangshin
Builder

Thanks for the direction.
The REST API shows all the referenced AD group names. Is it possible to see the splunk role(s) mapping to each these AD groups?

0 Karma

shangshin
Builder

I found it with the help of your clue. Thank you!

0 Karma

reed_kelly
Contributor

I missed it. Could you document the answer for everyone else? Also, what version of Splunk are you using?

coltwanger
Contributor

For future reference, since this was never answered, this should work to display roles associated with LDAP groups:

 | rest /servicesNS/nobody/system/admin/LDAP-groups | table title roles | search roles=*

bjarnedein
Explorer

But there is a limit to 1000 groups!
How can that limit be changed or bypassed?

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi bjarnedein,

this is a two fold issue while you can increase this limit by modifying limits.conf options for the [ldap] stanza to get more results (in theory) you will still hit the server side limit of the LDAP server. You would need to increase both settings to get more results back per query.

cheers, MuS

0 Karma

bjarnedein
Explorer

Hi MuS,

Thanks for your speedy response, and currently our [ldap] is the like:

ldap allow_multiple_matching_users 1
ldap max_mem_usage_mb 3000
ldap max_users_to_precache 30000

What I think is the interesting thing here is that when using ldapsearch we can get up till 10,000 rows.

I can't find any other key/values for the [ldap] stanza, do you know of any?

Cheers, Bjarne

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi,

try the limit=argument with ldapsearch https://docs.splunk.com/Documentation/SA-LdapSearch/latest/User/Theldapsearchcommand but as written before, as long as your LDAP server has a limit of 1000 (default for most of the LDAP implementations) you will not be able to retrieve more results.

cheers, MuS

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...