BookmarkSubscribeRSS Feed
AllanBowe
Barite | Level 11

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.

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
2 REPLIES 2
JuanS_OCS
Amethyst | Level 16

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. Smiley Wink

 

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

AllanBowe
Barite | Level 11

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..

 

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 967 views
  • 1 like
  • 2 in conversation