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

listGroupUsers() ignores the search option. #1554

Closed
sc-work-314 opened this issue Sep 4, 2024 · 2 comments
Closed

listGroupUsers() ignores the search option. #1554

sc-work-314 opened this issue Sep 4, 2024 · 2 comments

Comments

@sc-work-314
Copy link

Describe the bug?

in v18, listGroupUsers() adds a String search parameter, that turns into a "search" parameter. Does this need a specific server version to work?

What is expected to happen?

results should be filtered by the search parameter.

What is the actual behavior?

All group users are returned

Reproduction Steps?

groupApi.listGroupUsers(groupId, loginEmail, null, null, null, 20); // returns all users
groupApi.listGroupUsers(groupId, "profile.login eq \"%s\"".formatted(loginEmail), null, null, null, 20); // returns all users
groupApi.listGroupUsers(groupId, "login eq \"%s\"".formatted(loginEmail), null, null, null, 20); // returns all users

Additional Information?

No response

Java Version

openjdk version "21.0.2" 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-21.0.2.13.1 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.2.13.1 (build 21.0.2+13-LTS, mixed mode, sharing)

SDK Version

implementation group: 'com.okta.sdk', name: 'okta-sdk-api', version: '18.0.0'
implementation group: 'com.okta.sdk', name: 'okta-sdk-impl', version: '18.0.0'

OS version

No response

@sc-work-314 sc-work-314 added the bug label Sep 4, 2024
@arvindkrishnakumar-okta
Copy link
Contributor

arvindkrishnakumar-okta commented Sep 5, 2024

@sc-work-314 Thanks for posting!

There seems to be a discrepancy between the Open API v3 spec (used locally by the SDK for code generation) versus the spec used by the Okta backend. As a result of this, the generated API stubs for listGroupUsers(..) does not match with the backend.

I will get that fixed/updated soon.

Please note that the API documentation (up-to-date) at https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroupUsers does NOT contain search parameter and you should never be using it in future.

@sc-work-314
Copy link
Author

Thanks! I should've included the API link as well, but I wasn't sure if this was a mistake, or a version mismatch.
(I'll add it is too bad that this doesn't work, because I have use case to check a user's group membership, and the direct check would've been nicer than iterating the group, or the User's groups.)

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

No branches or pull requests

2 participants