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 2024

Innovate_SAS_Blue.png

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. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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