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
MacroCore library for app developers
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
Azurite | Level 17

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
MacroCore library for app developers
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1301 views
  • 1 like
  • 2 in conversation