# Okta Rest API to get User and groups

**URL:** <https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847>\
**Category:** API\
**Created:** [November 20, 2020, 9:07pm UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847 "2020-11-20T21:07:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nafzaal](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@nafzaal](https://devforum.okta.com/u/nafzaal)\
**Post date:** [November 20, 2020, 9:07pm UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847/1 "2020-11-20T21:07:42Z")

</div>

Hello,  
I am looking for information to get a person/employee profile and associated group using a single Okta Rest API call. currently I am making two APIs call to get a User Profile and its Group information

To get an employee User:  
{{url}}/api/v1/users?filter=profile.firstName eq “ABC”

To get a group for a person/employee  
{{url}}/api/v1/users/00u19eeb60tiPHZZX5d6/groups

Also How can I add select statement in above api call to get specific profile columns instead of complete user object?

---

<div class="post-metadata">

**Author:** ![phi1ipp](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@phi1ipp](https://devforum.okta.com/u/phi1ipp)\
**Post date:** [November 21, 2020, 2:13am UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847/2 "2020-11-21T02:13:01Z")

</div>

you can not, it is what it is

---

<div class="post-metadata">

**Author:** ![nafzaal](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@nafzaal](https://devforum.okta.com/u/nafzaal)\
**Post date:** [November 21, 2020, 6:07pm UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847/3 "2020-11-21T18:07:06Z")

</div>

alright.

Can I do selection of columns in rest api call to select specific column instead of complete User Object?

e.g. In below query, I am selecting id and status but it returns other attributes as well in response.  
url}}/api/v1/users?filter=profile.firstName eq “ABC”&select=id,status

---

<div class="post-metadata">

**Author:** ![phi1ipp](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@phi1ipp](https://devforum.okta.com/u/phi1ipp)\
**Post date:** [November 22, 2020, 3:23pm UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847/4 "2020-11-22T15:23:26Z")

</div>

no, it’s REST not GraphQL 🙂

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 7:07pm UTC](https://devforum.okta.com/t/okta-rest-api-to-get-user-and-groups/11847/6 "2024-02-08T19:07:33Z")

</div>


