B2B Saas Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Members

/

Search Members

Search Members

The Search Members method wraps the Search Members API endpoint. It can be used to search for Members within the logged-in Member's Organization.

Submitting an empty query returns all non-deleted Members within the logged-in Member's Organization.

*All fuzzy search filters require a minimum of three characters.


Method parameters


cursorstring

limitint

queryobject

Response fields


request_idstring

status_codeint

results_metadataobject

membersarray[objects]

organizationsarray[objects]
import { Text, TouchableOpacity, View } from 'react-native';
import { useStytchB2BClient } from '@stytch/react-native/b2b';

export const SearchMembers = () => {
  const stytch = useStytchB2BClient();

  const searchMembers = () => {
    stytch.organization.members.search({
      query: { operands: [{ filter_name: 'member_password_exists', filter_value: true }], operator: 'AND' },
    });
  };

  return (
    <View>
      <TouchableOpacity onPress={searchMembers}>
        <Text>Search Members</Text>
      </TouchableOpacity>
    </View>
  );
};

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "results_metadata": {
		"next_cursor": null,
		"total": 5
	},
  "members": [
    ...
  ],
  "organizations": {
    ...
  }
}