Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get no results with mv_getgroupmembers #331

Closed
Sergie89 opened this issue Mar 27, 2023 · 5 comments
Closed

Get no results with mv_getgroupmembers #331

Sergie89 opened this issue Mar 27, 2023 · 5 comments

Comments

@Sergie89
Copy link

Hi Allan,

I am trying to get a list of all groupmembers (SAS Viya 3.4). I have followed the instructions on https://sasjs.io/buildviya/. I have ran the SAS code on the following url: https://raw.githubusercontent.com/sasjs/core/main/all.sas and I then ran the following macro- %mv_getgroupmembers(All Users) (https://core.sasjs.io/mv__getgroupmembers_8sas.html).

But I don't get result:

afbeelding

@allanbowe
Copy link
Member

Thanks for raising the issue. Are you able to share a (sanitised) log?

@Sergie89
Copy link
Author

Hi Allan,

Thank you for your quick response. Please see attached file.

%mv_getgroupmembers.txt

@allanbowe
Copy link
Member

Hi @Sergie89,

I just tried this on a Viya 4 instance and the macro appears to be working as designed (I had thought that maybe the space was an issue, but it is not).

I did not have an "All Users" group, however it did work for other groups. Did you try the macro with any other groups? Is it possible you don't have an "All Users" group, or that you don't have permission to access it?

If you are looking to extract all the users, rather than the members of a particular group, you are probably better off using this macro: https://core.sasjs.io/mv__getusers_8sas.html

/Allan

@Sergie89
Copy link
Author

Hi @allanbowe ,

It works thanks. Is it possible to get a list of all groups & group members with one single SAS macro ?

@allanbowe
Copy link
Member

Thanks for confirming!

To your question - yes it's possible, just use this macro to get the lists of groups: https://core.sasjs.io/mv__getgroups_8sas.html

Then loop through the result with mv_getgroupmembers to get the members.

Feel free to make a PR should you create such a macro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants