BookmarkSubscribeRSS Feed
deleted_user
Not applicable
From metadata, how can I get all the users, their groups and their Authentication domains. Is any sample script available?
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
From searching the SAS support http://support.sas.com/ website, this conference paper (link below) discusses SAS 9.2 facilities related to this topic.

Scott Barry
SBBWorks, Inc.

Paper 321-2009
Using SAS® 9.2 Metadata Security Reporting and Auditing Features
Forrest Boozer and Diane Hatcher, SAS Institute Inc., Cary NC
http://support.sas.com/resources/papers/sgf09/321-2009.pdf
deleted_user
Not applicable
I'm assuming that you want to get hold of the data and then report/manipulate it in SAS code??

If that's the case try this :

options metaserver="meta1" /* Your metadata server */
metaport=8561
metaprotocol=bridge
metauser="sasadm"
metapass="*****************"
metarepository="Foundation" ; /* Presuming that your users are defined in the Foundation Repository */

data _null_; /* You might need to replace Foundation with an alternate repository name */
length id $20
type $256;
repos_rc=metadata_resolve("omsobj:RepositoryBase?@Name='Foundation'",type,id);
call symputx('reposid', id) ;
call symputx('reposid2', scan(id, 2, ".")) ;
run ;

filename inxml TEMP ; /* defines what metadata you'd like to get hold of */
data _null_ ;
file inxml ;
put
"" /
" &reposid" /
" Person" /
" " /
" SAS" /
" 404" /
" " /
" " /
" " /
" " /
" " /
"
" /
" " /
" " /
" " /
"
" /
" " /
"
" /
"
" /
"
" /
;
run ;

filename outxml 'd:\out.xml' ;

proc metadata in=inxml /* Fetches the requested metadata, and returns it as XML */
out=outxml ;
run ;

filename People TEMP ; /* Define an XML map to overlay on your XML */
data _null_ ;
file People ;
put
" " /
"" /
" " /
" //Person/IdentityGroups/IdentityGroup" /
" " /
" //Person/Logins/Login/@Name" /
" character" /
" string" /
" 200" /
"
" /
" " /
" //Person/Logins/Login/Domain/AuthenticationDomain/@Name" /
" character" /
" string" /
" 50" /
"
" /
" " /
" //Person/IdentityGroups/IdentityGroup/@Name" /
" character" /
" string" /
" 50" /
"
" /
"
" /
"
" /
;
run ;

libname outxml xml xmlmap=People access=READONLY; /* Defines a libname containing a table based on your XML map */

/* 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 */





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)


Message was edited by: simkinp

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1476 views
  • 0 likes
  • 2 in conversation