<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a report that lists the groups that a user belongs to? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316675#M94754</link>
    <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype=ActiveDirectory sAMAccountType=805306368  | dedup name | rex field=test max_match=0 "CN=(?&amp;lt;memberOf&amp;gt;[^,]+)" | table userID, memberOf,displayName,email,phone,city,st,zip,OU,department,company
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Feb 2017 18:43:05 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2017-02-23T18:43:05Z</dc:date>
    <item>
      <title>How to create a report that lists the groups that a user belongs to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316674#M94753</link>
      <description>&lt;P&gt;Our Active Directory logs contain a field called &lt;STRONG&gt;member_of&lt;/STRONG&gt; and the value contains all the groups that a user is a member of.  I would like to be able to create a report in table form using something similar to the values command listing each group a user is a member of.&lt;/P&gt;

&lt;P&gt;The data is within the field is in the following format:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;CN=XH_VI_Office,OU=GRP,OU=CO,DC=xmm,DC=local|CN=G_Ma43_Users_BYOD_Cloud_Users,OU=GRP,OU=CO,DC=xmm,DC=local|CN=XA_Outlook,OU=GRP,OU=CO,DC=xmm,DC=local|CN=G_GO_Win_SQL,OU=GRP,OU=CO,DC=xmm,DC=local|CN=AAG_GO_Admin,OU=Iox,OU=GRP,DC=xmm,DC=local|CN=XD_WIN,OU=GRP,OU=CO,DC=xmm,DC=local
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just want a list of all the CN values to be returned in a field as mentioned before in a list similar to the values command.  Is this something that would be possible?  Below is my current search which will let me know if the user is in the local admin group or domain admin group, but I want to expand it as mentioned above to show all groups.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype=ActiveDirectory sAMAccountType=805306368  | dedup name | eval localAdmin=if(like(memberOf,"%Local-Admin%"),"yes","no"), domainAdmin=if(like(memberOf,"%Domain Admins%"),"yes","no") | rename name AS userID, mail AS email, telephoneNumber AS phone,postalCode AS zip, l AS city | table userID,localAdmin,domainAdmin,displayName,email,phone,city,st,zip,OU,department,company
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 18:34:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316674#M94753</guid>
      <dc:creator>digital_alchemy</dc:creator>
      <dc:date>2017-02-23T18:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a report that lists the groups that a user belongs to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316675#M94754</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype=ActiveDirectory sAMAccountType=805306368  | dedup name | rex field=test max_match=0 "CN=(?&amp;lt;memberOf&amp;gt;[^,]+)" | table userID, memberOf,displayName,email,phone,city,st,zip,OU,department,company
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Feb 2017 18:43:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316675#M94754</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-02-23T18:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a report that lists the groups that a user belongs to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316676#M94755</link>
      <description>&lt;P&gt;This works, thanks.  Just had to change the field from test to the target field "memberOf&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 20:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-report-that-lists-the-groups-that-a-user-belongs/m-p/316676#M94755</guid>
      <dc:creator>digital_alchemy</dc:creator>
      <dc:date>2017-02-23T20:01:03Z</dc:date>
    </item>
  </channel>
</rss>

