BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Jed_Klei
Obsidian | Level 7

Hello 

 

I am looking for a script that will be able to pull user information , such as username , groups , related authdomains for Viya 3.5.

Most scripts I see are for sas 9.

Is there a script or tool that could be used to retrieve this info, or code that could be executed on SAS Studio?

 

Thank you for your reponse. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ
You may want to check out this topic, which has a sample program for reporting on users and groups.
https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-...

This pulls information from the identities service. The credentials service has endpoints for authentication domains (/credentials/domains) and for each domain you could call /credentials/domains/domain-id/credentials, which would indicate the identity (user or group) associated with each credential in that particular domain.
--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

4 REPLIES 4
JuanS_OCS
Azurite | Level 17

Hi @Jed_Klei ,

 

you might want to look into the sas-admin CLI https://documentation.sas.com/doc/en/calcdc/3.4/calcli/n01xwtcatlinzrn1gztsglukb34a.htm

 

You can also query, programatically, through the RestAPIs SAS VIya offers: 

https://developer.sas.com/rest-apis

 

gwootton
SAS Super FREQ
You may want to check out this topic, which has a sample program for reporting on users and groups.
https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-...

This pulls information from the identities service. The credentials service has endpoints for authentication domains (/credentials/domains) and for each domain you could call /credentials/domains/domain-id/credentials, which would indicate the identity (user or group) associated with each credential in that particular domain.
--
Greg Wootton | Principal Systems Technical Support Engineer
Jed_Klei
Obsidian | Level 7

Thank you for this.

 

I do experience the same issues mentioned in the post to link provided.

This is using the updated code.

My issue is the program completes with error but the temp file Work.Users is populated with 15900 users.

I then increased the obs, and each time i incremented it userinfo was loaded into the Work.userinfo,that are active and retrieved from LDAP.

Will changing the obs to 15901 ensure all users info are loaded into the temp Work.userinfo file?

 

 

gwootton
SAS Super FREQ
The table work.users is built from a loop of all users found in the identities service. Removing the obs limit, or setting it to a value higher than the total number of users, would ensure all users are added.
Without knowing the error you are encountering, I can't say why you are encountering an error.
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2628 views
  • 1 like
  • 3 in conversation