Get all assigned group to application with searching

I want to get all groups assigned to some application with filtering/search, below I’ve described next approaches which I tried:

  • Get assigned group for application
    /api/v1/apps/{app_id}/groups?expand=group&limit=10&search=profile.description eq “test”

I’ve added the ?expand=group param to be able to see the group-related info, however, the search param won’t be applied because the search isn’t working with _embedded object.

  • List Groups
    /api/v1/groups?expand=app&limit=4&search=profile.description eq “test”

I’m able to search and filter groups, however when I try to add the ?expand=app attribute I don’t receive any additional information (i.e. _embedded object), I think it’s some kind of issue because I’ve added this param according to documentation.
So, in this case, I am not able to get application information…

According to that, I am wondering how I can all groups assigned to some application with filtering or searching?

Hi @Andrii! Thanks for reporting your findings. We have opened an internal ticket to investigate this. I’ll keep you posted.

Thank you! I’ll be really appreciated it if you provide some ETA for resolving this issue or some workarounds?

Our engineering team is actively investigating this issue, with the internal ticket number OKTA-380836.

Hi @Andrii, thank you for patience as we looked into this. This is working as expected, you will not see the embedded object for “type”: “OKTA_GROUP” but rather only for type APP_GROUP which means the group was imported from an external source such as Active Directory.

Hi @sigama thank you for the response,

Let me add more context and maybe clear some things:

What do I have:

  • a group (type OKTA_GROUP) with standard attributes (name, description)
  • extended app profile with several custom attributes, which can be configured when a group assigns to the application

What do I want:

  • I want to get all groups assigned to the application with searching/filtering by custom attribute (on the app level)

Which questions do I have:

  1. Can filtering/searching be applied (filtering by custom attribute) during getting all groups from the application? or it’s a feature request?

{{url}}/api/v1/apps/{{appId}}/groups?search=profile.customAttr eq "value"

  1. Regarding your comment, you said "That I won’t see an embedded object for the type “OKTA_GROUP”
  • I was able to get embedded object if I specify expand=stats

So, it says that both (stats/ app) can be applied or there is somewhere in documentation a clarification that it can be applied only for groups with type “APP_GROUP”? otherwise the documentation should be updated, sorry if I missed something.

Thank you in advance,