In SAS 9 we could use SAS code to query metadata for group membership information (eg with a macro like this).
In Viya / SPRE, what would be an equivalent approach? Presuming XCMD is disabled.
Hey Alan, @AllanBowe ,
having in mind how SAS Viya works:
a- group memberships come from AD, except for the Custom Groups
b- SAS Viya works with Rest APIs
c- the Rest APIs contain methods to retrieve the memberships
d- you don't need XCMD to call a restAPI (that is the magic of rest APIs)
e- you can use JSON files to be sent to the rest APIs
I have not tried yet this particular method but I think it safe to assume you can run proc htttp,soap and or JSON to interact with the Rest APIs from "simple" SAS code.
However, and to be fair, I could not see a specific identity membership Rest request in https://developer.sas.com/apis/rest/CoreServices/
Pity
But...! SAS has made available as well https://github.com/sassoftware/pyviyatools
In there, I can see a https://github.com/sassoftware/pyviyatools/blob/master/listgroupsandmembers.py
And if I am correct, all should go down to use the /identities/groups and /identities/groups/'+groupid+'/members Rest APIs
Cheers,
Juan
Hey Juan!
Yes, I figured it must be a REST API to obtain an AD group listing, but like you, couldn't see it in the docs. Good spot finding it in the python repo! Will try out those endpoints..
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.