Getting Data In

How to use REST to find LDAP mapped groups (roles and the AD group(s) they are mapped to)

blacknight659
Explorer

I needed to find my roles were mapped to LDAP active directory groups. I ended up with the search below. It works, but I wanted to post it here to help others and/or ask the community for ideas on improvement.

I wanted to view the configuration stanza in /etc/system/local/authentication.conf under the [My_LDAP] stanza. Here, I can see which roles are assigned to my AD groups. I made the search below. You will notice the |transpose command. This helped to format the data in a more usable way.

| rest /services/configs/conf-authentication/My_LDAP
| transpose header_field=a column_name=role
| rename "row 1" as AD_Group
| search role!="eai:*" role!=id role=*
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Give this a try

| rest /services/admin/LDAP-groups splunk_server=local | table title roles | rename title as AD_Group

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Give this a try

| rest /services/admin/LDAP-groups splunk_server=local | table title roles | rename title as AD_Group

blacknight659
Explorer

This is much better. Thank you!

0 Karma

adoumbia
Observer

Thank you it helps

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...