Start a new topic

UserDiscovery on android doesnt return custom fields


In the users table we have some custom fields to specific additional info like address, user type etc. When I use UserDiscovery android API while I get the user for a specific criteria like email, the data returned doesnt contain any custom fields but only the _id, username and email. Is there a way to get the custom fields when doing the lookup? I can see that Rest API does return all fields and so it seems the android API is stripping off the additional fields on lookup.



Here is my code:

public static void verifyInstallerAndGetCertificationLevel(String email) {

AsyncUserDiscovery users = mKinveyClient.userDiscovery();

UserLookup criteria = users.userLookup();


users.lookup(criteria, new KinveyUserListCallback() {


public void onSuccess(User[] result) {

Log.d("CCU_INSTALLER", "received " + result.length + " users");

if (result.length == 1)

Log.d("CCU_INSTALLER", "installer details " + result[0].toString());



public void onFailure(Throwable error) {

Log.d("CCU_INSTALLER", "received " + error);




UserLookup will only return a limited subset of fields on the user object, so instead you can just query through the User api directly. Note UserLookup is meant to be used to preserve the privacy of users, so we limit the accessible fields on purpose.


Query q = new Query().equals("email", myEmail");

myClient.user().retrieve(q, new KinveyListCallback(){



Let me know if that works!
Login or Signup to post a comment