
xavpx (xavpx) asked a question.
Hello!
Found out recently, that I can get all the groups for the user via
/api/v1/users/${userId}/groups API. Is that possible to filter the output?
I tried: /api/v1/users/${userId}/groups?search=profile.name%20sw%20%22prefix%22 but it doesn't work
Regards
Olek

Hello @xavpx (xavpx) Thank you for reacting out to our Community!
The API call that you are using has an unsupported property there "profile.name", currently we support the following limited number of properties: status, lastUpdated, id, profile.login, profile.email, profile.firstName, and profile.lastName.
If you want to filter only specific groups, like Okta groups you can use something like this:
api/v1/{userid}/groups?filter=type eq "OKTA_GROUP"
Please also see: https://developer.okta.com/docs/reference/api/users/#list-users-with-a-filter
Community members help others by clicking Like or Select as Best on responses. Try it today.
Hey!
thanks for the answer!
I tried with:
/api/v1/users/${userId}/groups?filter=type%20eq%20%22APP_GROUP%22
(in both encoded and pure version) and it returns all groups still.
Looks like filtering does not work for groups endpoint, it works well however for users. Would be good to make it work groups as well, meanwhile I'll filter the output. it's not that huge overhead.
Thanks for the help
Olek