Start a new topic

User Discovery on Kinvey Xamarin


Is there a way to do User Discovery using the Kinvey Xamarin SDK? The iOS SDK has +[KCSUserDiscovery lookupUsersForFieldsAndValues:completionBlock:progressBlock:], but I can't find anything similar for the Xamarin SDK. If this isn't available, then what is the best practice way to search for users using the Xamarin SDK?

Thanks in advance


Thanks Billy

Your Xamarin developer might be right in terms of the User Discovery not doing exactly what I want anyway. To get around the issue, I've created a custom endpoint, and am querying the "user" collection. I'm trying to use the mongo db query syntax and doing an $or. It works fine when just searching one attribute, but doesn't return anything when searching multiple attributes. I'm expect I'm missing something, as it's the first time I've used mongo db. Nevertheless, I'm confident that I can come up with a solution using the custom endpoint.

One thing I'm not sure of though is since I'm essentially querying on 4 attributes doing a text search, how many users can be in the system before performance degrades? Is it better if I create another attribute that concatenates the text from the 4 attributes and then create an index on it?

Thanks again for investigating this issue.



Hello Jacob,

I spoke with our Engineering team and they may have a potential solution for this problem available on Monday, March 28, 2016. Our Xamarin developer had the following comments about the solution that will be released on the 28th.

"I think it may fix (or at least help) the customer based on what he mentions in the beginning of the support thread. He asked if there was a way to do User Discovery in Xamarin, and mentioned the corresponding functionality being available in iOS, based on the documentation. The solution that will be released on the 28th is directly related to providing this functionality in the Xamarin SDK.

Now the part where I'm not sure if it will get the customer exactly what he wants is based on what he mentioned later in the ticket. He was asking for a way to find users based on a user name or email starting with a particular string of letters. But the User Discovery functionality is filtered based on exact matches, not a partial match to the start of the name, for example. But, it may still help him accomplish what he wants to do with discovery."

We hope this solution will help you move forward. If the release becomes available sooner than the 28th, we will update this forum ticket to let you know.

Please let us know if you have any questions.



Hi Damien

I tried to query as per the example. After some trial and error, it looks like the collection name is "user". Anyway, when querying, I get the following exception:

"IndirectCollectionAccessDisallowed /Please use the appropriate API to access this collection for this app backend"

So it appears that I'm right back where I started, without any idea how to do User Discovery using the Xamarin SDK.

As an aside, the example in the link used query.Count() to retrieve the number of entities that matched. I get a "Method not implemented" exception when calling Count(). This is not specific to Users, it happens on all collections.

I really need some guidance with regards to retrieve users from the system, otherwise it's a real deal-breaker.




Hi Damien

I'm developing a social platform where a user can add other users to their contacts. The way I see it working is they type part of name eg. "smi" and it will return all the users in the system whose firstname, surname or email address starts with "smi". To be honest, I hadn't realised that the Users collection is queryable in the same way as other collections. I had assumed that it was a "special" collection since there's no way (that I can see) to add hooks in BL to the Users Collection. I will try and querying it today in the manner that you suggest. I assume that the collection name is "Users". I'll let you know if I have any problems.





Can you help me understand your use case?  What fields are you trying to search for users on?  You should be able to use the same queries you use for the data store (seen in the guide here:  ) for users.

Please let me know if you have any other questions,


Login or Signup to post a comment