<?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: SAS Program for Reporting Groups and Roles at the Same Time in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286944#M5529</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;take a look at the attached program. This was provided by someone a while back. It uses the API data step function.&lt;/P&gt;
&lt;P&gt;You'll have to add your parameters for user ID and pwd (use unrestricted user).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is a data set with a list of user, groups and roles. This might give you the ground work and a starting point, and can be modified to fit your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Anja&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2016 17:26:14 GMT</pubDate>
    <dc:creator>anja</dc:creator>
    <dc:date>2016-07-25T17:26:14Z</dc:date>
    <item>
      <title>SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286905#M5528</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have been tasked with writing a SAS Program to report on:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Users &amp;amp; Groups In SAS &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/LI&gt;&lt;LI&gt;Groups&amp;nbsp;&amp;amp; Roles In SAS &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I was able to extract Users &amp;amp; Groups Successfully with the below Program, but am stumped with the Groups &amp;amp; Roles. Would anybody be able to provide a similar program or way of obtaining the info?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="Segoe UI Symbol" size="3"&gt;&lt;FONT face="Segoe UI Symbol" size="3"&gt;&lt;CODE class=" language-sas"&gt;Options metauser="XXXXXXX"

metaserver="XXXXXXX"

metaport=XXXXXX

metapass="XXXXXXXX"

metaprotocol=bridge

metarepository=Foundation;




data users_grps;

length uri name group groupuri $256 role roleuri $256 id $20;

 n=1;

 uri="";

 name="";

 group="";

 groupuri="";

 id="";

 nobj=metadata_getnobj("omsobj:Person?@Id contains '.'",n, 1);

if nobj=0 then put "No Persons available";

else do while (nobj &amp;gt; 0);

 

 rc=metadata_getattr(uri,"Name", Name); 

 a=1;

 grpassn=metadata_getnasn(uri, "IdentityGroups", a, groupuri);

if grpassn in (-3,-4) then do;

 group = "No Groups"; 

output;

end;

else do while (grpassn &amp;gt; 0 );

 rc2=metadata_getattr(groupuri, "Name", group);

 a+1;

output; 

 grpassn =metadata_getnasn(groupuri, "IdentityGroups", a, groupuri);

end;

 n+1;

 nobj=metadata_getnobj("omsobj:Person?@Id contains '.'",n,uri);

end;

keep name group;

run;

Proc Sort data=work.users_grps;

By name;

Run;

ods pdf file="\\Dub-sascp-d01\sasdata\USER_REPORTS\usergroups_%sysfunc(Today(), YYMMDDN8.)%sysfunc(Today(),HHMMSSN6.).pdf";

proc report data=users_grps nowd headline headskip;

columns name group;

define name / order 'User Name' format=$30.;

define group / order 'Group' format=$30.;

break after name / skip;

run;

ods pdf close;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2016 15:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286905#M5528</guid>
      <dc:creator>David_Luttrell</dc:creator>
      <dc:date>2016-07-25T15:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286944#M5529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;take a look at the attached program. This was provided by someone a while back. It uses the API data step function.&lt;/P&gt;
&lt;P&gt;You'll have to add your parameters for user ID and pwd (use unrestricted user).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is a data set with a list of user, groups and roles. This might give you the ground work and a starting point, and can be modified to fit your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Anja&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286944#M5529</guid>
      <dc:creator>anja</dc:creator>
      <dc:date>2016-07-25T17:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286951#M5530</link>
      <description>&lt;P&gt;Just ran your program .. and it gives you the same output already (listing groups, roles and users in one table).&lt;/P&gt;
&lt;P&gt;Am curious, what is the reason for needing&amp;nbsp; 2 reports, one for users &amp;amp; groups, a second one for groups &amp;amp; roles?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you looked at the environment manager reporting to see if this could help?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 17:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/286951#M5530</guid>
      <dc:creator>anja</dc:creator>
      <dc:date>2016-07-25T17:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287123#M5537</link>
      <description>&lt;P&gt;Hi Anja,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bit stumped with the groups and roles. Will Run your program to see if it resolves &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Appreciate the feedback. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like the groups and roles report would be,&amp;nbsp;if you get me would be groups on the left, roles on the right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SAS_DATAANALYST&lt;/STRONG&gt; - Add in For Microsoft Office&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;- Data Integration Object Reader&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;- Enterprise Guide Advanced&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;SAS_SUPERUSER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt; - Metadata: Operation&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-Data Integration Object Developers&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 08:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287123#M5537</guid>
      <dc:creator>David_Luttrell</dc:creator>
      <dc:date>2016-07-26T08:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287128#M5538</link>
      <description>&lt;P&gt;Maybe the &lt;STRONG&gt;%MDUEXTR&lt;/STRONG&gt; macro as described in the SAS Blog "&lt;A href="http://blogs.sas.com/content/sgf/2016/01/13/sas-administrators-tip-keeping-track-of-sas-users/" target="_blank"&gt;SAS administrators tip: Keeping track of SAS users&lt;/A&gt;" could be helpfull for you. It generates various tables containing all the information you indicate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From these tables you can basically generate any report you would like with regard to users, groups and roles.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 09:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287128#M5538</guid>
      <dc:creator>Resa</dc:creator>
      <dc:date>2016-07-26T09:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287129#M5539</link>
      <description>Thanks Resa,&lt;BR /&gt;&lt;BR /&gt;That would actually make sense as we use it in our AD_Sync import. Great shout, am still yet to get around to testing the Anja and your programs so will get back to you on this later on.&lt;BR /&gt;&lt;BR /&gt;Appreciate the help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Kind Regards,&lt;BR /&gt;David</description>
      <pubDate>Tue, 26 Jul 2016 09:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287129#M5539</guid>
      <dc:creator>David_Luttrell</dc:creator>
      <dc:date>2016-07-26T09:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program for Reporting Groups and Roles at the Same Time</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287150#M5540</link>
      <description>&lt;P&gt;%MDUEXTR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems like a more efficient way of getting the information required as opposed to messing with metadata. Appreciate you two working on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 11:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-Program-for-Reporting-Groups-and-Roles-at-the-Same-Time/m-p/287150#M5540</guid>
      <dc:creator>David_Luttrell</dc:creator>
      <dc:date>2016-07-26T11:34:18Z</dc:date>
    </item>
  </channel>
</rss>

