---
title: discoverUserIdentityWithPhoneNumber
framework: CloudKit JS
role: symbol
role_heading: Instance Method
platforms: [cloudkit js 1.0+]
path: cloudkitjs/cloudkit.container/discoveruseridentitywithphonenumber
---

# discoverUserIdentityWithPhoneNumber

Fetches information about a single user based on the user’s phone number.

## Declaration

```data
Promise<CloudKit.UserIdentitiesResponse, CloudKit.CKError> discoverUserIdentityWithPhoneNumber(
	String phoneNumber
);
```

## Parameters

- `phoneNumber`: The user’s phone number.

## Return Value

Return Value A Promise object that resolves to CloudKit.UserIdentitiesResponse object, or rejects to a CKError object.

## Discussion

Discussion Use this method to get the ID of a user based on the user’s phone number. The user must meet the following criteria: The user must be in the current user’s address book. The user must have run the app. The user must have granted the permission to be discovered for this container.

## See Also

### Discovering Users

- [fetchCurrentUserIdentity](cloudkitjs/cloudkit.container/fetchcurrentuseridentity.md)
- [discoverAllUserIdentities](cloudkitjs/cloudkit.container/discoveralluseridentities.md)
- [discoverUserIdentities](cloudkitjs/cloudkit.container/discoveruseridentities.md)
- [discoverUserIdentityWithEmailAddress](cloudkitjs/cloudkit.container/discoveruseridentitywithemailaddress.md)
- [discoverUserIdentityWithUserRecordName](cloudkitjs/cloudkit.container/discoveruseridentitywithuserrecordname.md)
