<?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 Get list of all users and their Viya custom groups in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/562091#M359</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have SAS Viya 3.4 deployed on Linux. In our AD we have 2 types( internal and external) of users which belong to different custom groups in SAS Viya.&lt;/P&gt;&lt;P&gt;We want to customize the default "User Activity" to see reports activity only for external users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I am trying to achieve this is to get the list of all users in SAS Viya and name of custom groups they belong so in my report I could filter users by custom group name. Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 20:01:43 GMT</pubDate>
    <dc:creator>BeNur</dc:creator>
    <dc:date>2019-05-28T20:01:43Z</dc:date>
    <item>
      <title>Get list of all users and their Viya custom groups</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/562091#M359</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have SAS Viya 3.4 deployed on Linux. In our AD we have 2 types( internal and external) of users which belong to different custom groups in SAS Viya.&lt;/P&gt;&lt;P&gt;We want to customize the default "User Activity" to see reports activity only for external users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I am trying to achieve this is to get the list of all users in SAS Viya and name of custom groups they belong so in my report I could filter users by custom group name. Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 20:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/562091#M359</guid>
      <dc:creator>BeNur</dc:creator>
      <dc:date>2019-05-28T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of all users and their Viya custom groups</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/562729#M363</link>
      <description>&lt;P&gt;UPD:&lt;BR /&gt;Found one of the possible solutions:&amp;nbsp;&lt;A href="https://github.com/sassoftware/pyviyatools/blob/master/listgroupsandmembers.py" target="_blank"&gt;https://github.com/sassoftware/pyviyatools/blob/master/listgroupsandmembers.py&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 22:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/562729#M363</guid>
      <dc:creator>BeNur</dc:creator>
      <dc:date>2019-05-30T22:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of all users and their Viya custom groups</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/637761#M565</link>
      <description>&lt;P&gt;If you wanted to do this in SAS you could use the &lt;A href="https://github.com/macropeople/macrocore" target="_self"&gt;macrocore&lt;/A&gt; library as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* get all users */
%mv_getusers(outds=users)

/* get all groups */
%mv_getgroups(outds=groups)

/* get users in a group */
%mv_getgroupmembers(GROUPNAME,outds=users)

/* get groups for a user */
%mv_getusergroups(USERNAME,outds=groups)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A guide to setting up the access token is available &lt;A href="https://sasjs.io/backend/buildviya/" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note - this only includes the users &amp;amp; groups that have been explicitly added to viya, ie - it's not necessarily the full list of users who can access the box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 23:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Get-list-of-all-users-and-their-Viya-custom-groups/m-p/637761#M565</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-04-05T23:57:52Z</dc:date>
    </item>
  </channel>
</rss>

