<?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 get all users, groups and authentication domain from metadata in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72228#M7197</link>
    <description>From searching the SAS  support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website, this conference paper (link below) discusses SAS 9.2 facilities related to this topic.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Paper 321-2009&lt;BR /&gt;
Using SAS® 9.2 Metadata Security Reporting and Auditing Features&lt;BR /&gt;
Forrest Boozer and Diane Hatcher, SAS Institute Inc., Cary NC&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/sgf09/321-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/sgf09/321-2009.pdf&lt;/A&gt;</description>
    <pubDate>Fri, 18 Sep 2009 20:56:42 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-09-18T20:56:42Z</dc:date>
    <item>
      <title>How to get all users, groups and authentication domain from metadata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72227#M7196</link>
      <description>From metadata, how can I get all the users, their groups and their Authentication domains. Is any sample script available?</description>
      <pubDate>Fri, 18 Sep 2009 19:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72227#M7196</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-18T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all users, groups and authentication domain from metadata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72228#M7197</link>
      <description>From searching the SAS  support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website, this conference paper (link below) discusses SAS 9.2 facilities related to this topic.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Paper 321-2009&lt;BR /&gt;
Using SAS® 9.2 Metadata Security Reporting and Auditing Features&lt;BR /&gt;
Forrest Boozer and Diane Hatcher, SAS Institute Inc., Cary NC&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/sgf09/321-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/sgf09/321-2009.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 18 Sep 2009 20:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72228#M7197</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-09-18T20:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all users, groups and authentication domain from metadata</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72229#M7198</link>
      <description>I'm assuming that you want to get hold of the data and then report/manipulate it in SAS code??&lt;BR /&gt;
&lt;BR /&gt;
If that's the case try this :&lt;BR /&gt;
&lt;BR /&gt;
options metaserver="meta1" /* Your metadata server */&lt;BR /&gt;
        metaport=8561&lt;BR /&gt;
        metaprotocol=bridge&lt;BR /&gt;
        metauser="sasadm"&lt;BR /&gt;
        metapass="*****************"&lt;BR /&gt;
		metarepository="Foundation"  ; /* Presuming that your users are defined in the Foundation Repository */&lt;BR /&gt;
&lt;BR /&gt;
data _null_; /* You might need to replace Foundation with an alternate repository name */&lt;BR /&gt;
    length id $20&lt;BR /&gt;
	   type $256;&lt;BR /&gt;
    repos_rc=metadata_resolve("omsobj:RepositoryBase?@Name='Foundation'",type,id); &lt;BR /&gt;
	call symputx('reposid', id) ;&lt;BR /&gt;
	call symputx('reposid2', scan(id, 2, ".")) ;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
filename inxml TEMP ; /* defines what metadata you'd like to get hold of */&lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
	file inxml ;&lt;BR /&gt;
	put &lt;BR /&gt;
		"&lt;GETMETADATAOBJECTS&gt;" /&lt;BR /&gt;
		"   &lt;REPOSID&gt;&amp;amp;reposid&lt;/REPOSID&gt;" /&lt;BR /&gt;
		"   &lt;TYPE&gt;Person&lt;/TYPE&gt;" /&lt;BR /&gt;
		"   &lt;OBJECTS&gt;&lt;/OBJECTS&gt;" /&lt;BR /&gt;
		"   &lt;NS&gt;SAS&lt;/NS&gt;" /&lt;BR /&gt;
		"   &lt;FLAGS&gt;404&lt;/FLAGS&gt;" /&lt;BR /&gt;
		"   &lt;OPTIONS&gt;" /&lt;BR /&gt;
    "      &lt;TEMPLATES&gt;" /&lt;BR /&gt;
		"         &lt;PERSON&gt;" /&lt;BR /&gt;
		"           &lt;IDENTITYGROUPS&gt;&lt;/IDENTITYGROUPS&gt;" /&lt;BR /&gt;
		"           &lt;LOGINS&gt;&lt;/LOGINS&gt;" /&lt;BR /&gt;
		"         &lt;/PERSON&gt;" /&lt;BR /&gt;
		"         &lt;IDENTITYGROUP id="" name=""&gt;&lt;/IDENTITYGROUP&gt;" /&lt;BR /&gt;
		"         &lt;LOGIN id="" name=""&gt;" /&lt;BR /&gt;
		"					  &lt;DOMAIN&gt;&lt;/DOMAIN&gt;" /&lt;BR /&gt;
		"					&lt;/LOGIN&gt;" /&lt;BR /&gt;
		"					&lt;AUTHENTICATIONDOMAIN name=""&gt;&lt;/AUTHENTICATIONDOMAIN&gt;" /&lt;BR /&gt;
		"      &lt;/TEMPLATES&gt;" /&lt;BR /&gt;
		"   &lt;/OPTIONS&gt;" /&lt;BR /&gt;
		"&lt;/GETMETADATAOBJECTS&gt;" /&lt;BR /&gt;
	;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
filename outxml 'd:\out.xml' ;&lt;BR /&gt;
&lt;BR /&gt;
proc metadata in=inxml /* Fetches the requested metadata, and returns it as XML */&lt;BR /&gt;
			  out=outxml ;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
filename People TEMP ; /* Define an XML map to overlay on your XML */&lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
	file People ;&lt;BR /&gt;
	put &lt;BR /&gt;
		" " /&lt;BR /&gt;
		"&lt;SXLEMAP version="1.2"&gt;" /&lt;BR /&gt;
		"    &lt;TABLE name="People"&gt;" /&lt;BR /&gt;
		"        &lt;TABLE-PATH syntax="XPath"&gt;//Person/IdentityGroups/IdentityGroup&lt;/TABLE-PATH&gt;" /&lt;BR /&gt;
		"        &lt;COLUMN name="NAME"&gt;" /&lt;BR /&gt;
		"            &lt;PATH syntax="XPath"&gt;//Person/Logins/Login/@Name&lt;/PATH&gt;" /&lt;BR /&gt;
		"            &lt;TYPE&gt;character&lt;/TYPE&gt;" /&lt;BR /&gt;
		"            &lt;DATATYPE&gt;string&lt;/DATATYPE&gt;" /&lt;BR /&gt;
		"            &lt;LENGTH&gt;200&lt;/LENGTH&gt;" /&lt;BR /&gt;
		"        &lt;/COLUMN&gt;" /&lt;BR /&gt;
		"        &lt;COLUMN name="ACE"&gt;" /&lt;BR /&gt;
		"            &lt;PATH syntax="XPath"&gt;//Person/Logins/Login/Domain/AuthenticationDomain/@Name&lt;/PATH&gt;" /&lt;BR /&gt;
		"            &lt;TYPE&gt;character&lt;/TYPE&gt;" /&lt;BR /&gt;
		"            &lt;DATATYPE&gt;string&lt;/DATATYPE&gt;" /&lt;BR /&gt;
		"            &lt;LENGTH&gt;50&lt;/LENGTH&gt;" /&lt;BR /&gt;
		"        &lt;/COLUMN&gt;" /&lt;BR /&gt;
		"        &lt;COLUMN name="GROUP"&gt;" /&lt;BR /&gt;
		"            &lt;PATH syntax="XPath"&gt;//Person/IdentityGroups/IdentityGroup/@Name&lt;/PATH&gt;" /&lt;BR /&gt;
		"            &lt;TYPE&gt;character&lt;/TYPE&gt;" /&lt;BR /&gt;
		"            &lt;DATATYPE&gt;string&lt;/DATATYPE&gt;" /&lt;BR /&gt;
		"            &lt;LENGTH&gt;50&lt;/LENGTH&gt;" /&lt;BR /&gt;
		"        &lt;/COLUMN&gt;" /&lt;BR /&gt;
		"    &lt;/TABLE&gt;" /&lt;BR /&gt;
		"&lt;/SXLEMAP&gt;" /&lt;BR /&gt;
	;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
libname outxml xml xmlmap=People access=READONLY; /* Defines a libname containing a table based on your XML map */&lt;BR /&gt;
&lt;BR /&gt;
/* I'd advise that you copy this table elsewhere before you try to manipulate it, I've seen some odd problems with the XML libname in the past */&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also, you may find this paper useful for future reference (http://www2.sas.com/proceedings/forum2008/134-2008.pdf)

(I've just added some comments to the code)&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: simkinp</description>
      <pubDate>Thu, 24 Sep 2009 12:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-get-all-users-groups-and-authentication-domain-from/m-p/72229#M7198</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-24T12:30:28Z</dc:date>
    </item>
  </channel>
</rss>

