hello, is there a way to search for all users with...
# ask-a-descoper
t
hello, is there a way to search for all users with a certain permission via the management api (using the python sdk if it matters)?
r
t
I did, and also went over https://docs.descope.com/api/management/users/search-users but there doesn't seem to be a permissions filter, only roles - meaning i'd need to make 2 api requests to get a list of users with a certain permission
r
Hi @Tomer Brisker You can retrieve all users using the search_all. also you can pass filters as a parameters in SDK. There you will get all user details Python SDK https://docs.descope.com/management/user-management/sdks#search-users And can you explain your use case for permissions filter things in above SDK you can pass role_names as a filter.
t
@Rahul Rijhwani the usecase is that I want to get a list of all users with a specific permission, without pulling all the users in the system for it or doing another query to get all roles with that permission
i.e. I would expect a parameter
permissionNames
on the user search api, similar to
roleNames
r
Let me check
Hi @Tamir Yakov We are not supporting permissionNames filter you can create features request for that. Also as of now you can get all users and from user list you can locally filter based of permission names.