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

# discoverUserIdentityWithUserRecordName

Fetches information about a single user using the record name.

## Declaration

```data
Promise<CloudKit.UserIdentitiesResponse, CloudKit.CKError> discoverUserIdentityWithUserRecordName(
	String userRecordName
);
```

## Parameters

- `userRecordName`: The name of the user record.

## 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 retrieve information about a user for whom you have the corresponding name property of the User record. 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)
- [discoverUserIdentityWithPhoneNumber](cloudkitjs/cloudkit.container/discoveruseridentitywithphonenumber.md)
