# Search for user by email

**URL:** <https://community.hubspot.com/t/search-for-user-by-email/41010>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [July 20, 2021, 2:49pm UTC](https://community.hubspot.com/t/search-for-user-by-email/41010 "2021-07-20T14:49:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnpp2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johnpp2/32/99949_2.png) [@johnpp2](https://community.hubspot.com/u/johnpp2)\
**Post date:** [July 20, 2021, 2:49pm UTC](https://community.hubspot.com/t/search-for-user-by-email/41010/1 "2021-07-20T14:49:51Z")

</div>

Is there a way to search for a user by email address (probably same as user name)? I’m trying to look up a user to populate the Company Owner field when creating/updating companies.

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [July 20, 2021, 8:49pm UTC](https://community.hubspot.com/t/search-for-user-by-email/41010/2 "2021-07-20T20:49:58Z")

</div>

Hello @johnpp2, currently we have a settings “user provisioning API”. You can visit this page to read about it: [More information here. (](https://developers.hubspot.com/docs/api/settings/user-provisioning)This API can be used to manage the users on an account and manage the roles of those users.)

I hope this information helps.

Pam

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [July 20, 2021, 8:54pm UTC](https://community.hubspot.com/t/search-for-user-by-email/41010/3 "2021-07-20T20:54:01Z")

</div>

@johnpp2, you can either use the [CRM search](https://developers.hubspot.com/docs/api/crm/search)

```lia-code-sample
{
 "filters": [
 {
 "propertyName": "email",
 "operator": "EQ",
 "value": "dogs@cats.com"
 }
 ]
 }

```

or you can use the older [V1 endpoint](https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_email)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [July 21, 2021, 1:40pm UTC](https://community.hubspot.com/t/search-for-user-by-email/41010/4 "2021-07-21T13:40:18Z")

</div>

Hi @johnpp2 ,  
you can search user according to email id or user id by this api  
Below is the Node Code ,please use it to get user info with email var request = require(“request”);  
var options = {  
method: ‘POST’,  
url: ‘[https://api.hubapi.com/settings/v3/users/](https://api.hubapi.com/settings/v3/users/)’,  
headers: {accept: ‘application/json’, ‘content-type’: ‘application/json’},  
body: {  
email: ‘newUser@email.com’,  
sendWelcomeEmail: ‘true’  
},  
json: true  
};  
request(options, function (error, response, body) {  
if (error) throw new Error(error);  
console.log(body);  
}); for more info please refer to this doc [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/settings/user-provisioning)

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![GBersac8](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@GBersac8](https://community.hubspot.com/u/GBersac8)\
**Post date:** [July 22, 2024, 9:09am UTC](https://community.hubspot.com/t/search-for-user-by-email/41010/5 "2024-07-22T09:09:40Z")

</div>

The code you’ve provided is to create a new user. I don’t understand how it answers the question.
