okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

IApplicationsClient.ListApplicationUsers has a filter argument, but the API doesn't support it. #484

Closed sflanker closed 3 years ago

sflanker commented 3 years ago

I tried using the filter argument of the ListApplicationUsers function but as far as I can tell this is not actually supported by the API.

Current behavior

Any kind of filter parameter results in a 400 Bad Request response with the errorSummary "Invalid search criteria."

Examples I've tried:

Expected behavior

If this parameter is supported it should not be present on this method.

Minimal reproduction of the problem with instructions

Hopefully the description above is simple enough to enable an easy repro.

Environment

andriizhegurov-okta commented 3 years ago

Hi @sflanker, I guess you are talking about q parameter for ListApplicationUsers function. This parameter is checked against several App Users's properties and should contain a sub-string, you cannot use it with expressions. Please take a look at the List users assigned to application documentation for details.

sflanker commented 3 years ago

@andriizhegurov-okta No, I'm talking about this: https://github.com/okta/okta-sdk-dotnet/blob/master/src/Okta.Sdk/Generated/IApplicationsClient.Generated.cs#L271 (the filter parameter on the ListApplicationUsers method). This is bad interface design since this parameter appears to be unsupported (but maybe it's just a documentation issue?). If there is a way to actually use this parameter I would love to know, and a list of supported fields would be great (as exists for other methods that do support this parameter: https://github.com/okta/okta-sdk-dotnet/blob/master/src/Okta.Sdk/Generated/IApplicationsClient.Generated.cs#L24)

andriizhegurov-okta commented 3 years ago

@sflanker Unfortunately it's not currently possible to use a filter with this function. filter parameter doesn't allow any expressions, it is for internal use only and is not documented. More information on possible parameters and usage can be found in our Apps documentation. Sorry for inconvenience.