ringcentral / RingCentral.Net

RingCentral SDK for .NET
MIT License
19 stars 26 forks source link

RingCentral.Net/Definitions/SearchViaGet2Parameters.cs - "scimType" : "invalidFilter" #38

Closed lebtech closed 3 years ago

lebtech commented 3 years ago

Content: { "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:Error" ], "status" : "400", "scimType" : "invalidFilter", "detail" : "Only 'userName' or 'emails' fields and operation 'eq' are supported" }

How do I format the filter expression for the SCIM Search/List Users endpoint? Documentation shows this: new SearchViaGet2Parameters { //filter = "", //startIndex = 1, //count = 100 };

Everything i've tried for the always returns "scimType" : "invalidFilter". Is there an example that uses this filter? I am trying to filter by username. I've tried dozens of combinations of "userName eq {userName}", "userName%20eq%20{userName}", "userName={userName}", etc.

Any help would be greatly appreciated.

lebtech commented 3 years ago

https://developers.ops.ringcentral.com/api-reference/SCIM/searchViaGet2

tylerlong commented 3 years ago

Does this help? https://github.com/ringcentral/RingCentral.Net/blob/master/RingCentral.Tests/ScimTest.cs

var searchRequest = new SearchRequest
                {
                    count = 1,
                    filter = $"emails eq \"{EMAIL}\""
                };
tylerlong commented 3 years ago

For questions please post then to https://community.ringcentral.com/index.html

Create an issue here if you believe there is a bug with the SDK.