Hi,
I have a queries pertaining getiing a full listing of user. Hereare the code i use
=======================================
options
metaserver="mysVA5101"
metaport=8561
metauser="admin"
metapass="Admin12345"
metarepository=Foundation
metaprotocol=BRIDGE;
/* Specify the directory for the extracted metadata.*/
libname meta "C:\temp";
/* Extract identity information from the metadata.*/
%mduextr(libref=meta);
/* Match the person identity to UserIDs */
proc sql;
select a.Name,a.DisplayName,b.UserId
from meta.Person as a,meta.Logins as b
where a.keyid=b.keyid;
quit;
=============================
The result may refer to following attach image.
My queries is, beside extracting the user is, can we also extract the following information:
1) Last login date
2) user id creation date
3) user id status (active,barred,etc)
Your help and advise is appreciated.
Regards,
Mike
Those attributes are not exported to the canonical tables. But at least 1) and 2) should be available within metadata, and accessible by data step functions. Not sure about 3), I wasn't aware of that you can set status for a user, or do you mean status of a user id from the external authentication provider?
I try to browse the table which generated using %mduextr(libref=meta), the tables shows inside there does not show item 1 and 2. Is there any specific command or code i can use.
No, item 1 & 2 are available via data step functions, NOT in the canonical tables (created by %mduextr).
may i know which tables in the metatdata i should refer to?
There are no logical (that is, what we as SAS users can see) tables in the metadata server. We can query the metadata using different API:s, and one is using data step functions.
The data is stored logically following an object model approach. For a reference abut that, follow Shivas link.
For syntax on data step metadata functions, see online doc. there are also quite a lot of papers and samples available on the SAS support site as well.
Hi ,
Please can you refer any document to details 1 and 2
Hi ,
Check this link for login and other details of metadata.Hope this helps.
http://support.sas.com/documentation/cdl/en/omamodref/61849/HTML/default/viewer.htm#login.htm
Thanks,
Shiva
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.