BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
zmetz
Fluorite | Level 6

I'm developing a front-end to a client's SAS install along with some other services. I've been successful using the Viya 3.5 APIs to retrieve collections of reports, thumbnails, etc. using an admin account token. My main task, though, is to get a list of all reports that a given user is authorized to view. Any suggestions on how I would go about that? Ideally it would all be done with the REST APIs.

1 ACCEPTED SOLUTION

Accepted Solutions
joeFurbee
Community Manager

Hi @zmetz

A colleague of mine mentioned the following:

If one has a list of all the reports, then one can use https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision to get the decision on whether a user can read a report.

We should be able to use this API to get a list of reports: https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports.

 

I've not used auth decision API previously and I don't see a set of examples. Let's explore together if we can make calls to get the info you need. I'll also check with development to get more details on the API.

 

Thanks,

Joe


Join us for SAS Community Trivia

SAS Bowl LIII, SAS Hackathon 2025
Wednesday, August 25, 2025 at 10 am.

View solution in original post

3 REPLIES 3
zmetz
Fluorite | Level 6

Edit to add: I'm not so much looking for a code example as an approach to how I would collect this and match it up. I'm a little confused by the SAS terminology (principles, memberships) as I've just shifted from doing this same thing for Tableau. Again I'm running the API as an admin user. I'm collecting this information ahead of time into my applications DB, so I will have a table of users, table of reports, and a linking table, and that will all be updated periodically. Any help is appreciated!

joeFurbee
Community Manager

Hi @zmetz

A colleague of mine mentioned the following:

If one has a list of all the reports, then one can use https://developer.sas.com/apis/rest/v3.5/CoreServices/#obtain-an-authorization-decision to get the decision on whether a user can read a report.

We should be able to use this API to get a list of reports: https://developer.sas.com/apis/rest/Visualization/#get-a-collection-of-reports.

 

I've not used auth decision API previously and I don't see a set of examples. Let's explore together if we can make calls to get the info you need. I'll also check with development to get more details on the API.

 

Thanks,

Joe


Join us for SAS Community Trivia

SAS Bowl LIII, SAS Hackathon 2025
Wednesday, August 25, 2025 at 10 am.
zmetz
Fluorite | Level 6

Thank you, @joeFurbee for your direction. I was able to accomplish this with an admin token and a combination of:

Then to determine what the user has read access to:

  • API "authorization/decisions" passing: { "request": { "uri": "[uri]", "method": "GET" }, "principals": [ { "name": "[name]", "type": "user" } ], "permission": "read" }

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 2316 views
  • 3 likes
  • 2 in conversation