# ListUsers API does not return Link header for Pagination

**URL:** <https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497>\
**Category:** API\
**Created:** [February 21, 2022, 5:28pm UTC](https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497 "2022-02-21T17:28:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyriakoskark](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kyriakoskark](https://devforum.okta.com/u/kyriakoskark)\
**Post date:** [February 21, 2022, 5:28pm UTC](https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497/1 "2022-02-21T17:28:30Z")

</div>

Hi everyone,

I am consuming the {{url}}/api/v1/groups?q=a&limit=25 okta API in order to list all the groups for a particular query.

When the response is returned though the Link header is not included in the response headers in order to start the pagination again and as a result, the pagination doesn’t work. that was first discovered using the OKTA SDK for .Net (4.00).

Below is the query I’m using in curl format:

````auto
curl --location --request GET 'https://{{Deliberately_Removed}}.okta.com/api/v1/groups?q=a&limit=25' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{Deliberately_Removed}}' \
--header 'Cookie: JSESSIONID=F29E3DF3EB413582491485CA2C7861D8'```
````

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [February 23, 2022, 9:27pm UTC](https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497/2 "2022-02-23T21:27:12Z")

</div>

Hello,

If your initial query returns less than 25 groups (in this case), then the link headers will not be present.

---

<div class="post-metadata">

**Author:** ![gabriel.sroka](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/gabriel.sroka/32/1292_2.png) [@gabriel.sroka](https://devforum.okta.com/u/gabriel.sroka)\
**Post date:** [December 9, 2022, 8:26pm UTC](https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497/3 "2022-12-09T20:26:29Z")

</div>

Find Groups doesn’t paginate: [Groups | Okta Developer](https://developer.okta.com/docs/reference/api/groups/#find-groups)

You’d have to use search: [Groups | Okta Developer](https://developer.okta.com/docs/reference/api/groups/#list-groups-with-search)

or filter: [Groups | Okta Developer](https://developer.okta.com/docs/reference/api/groups/#filters)

---

<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 12, 2024, 10:30pm UTC](https://devforum.okta.com/t/listusers-api-does-not-return-link-header-for-pagination/19497/4 "2024-02-12T22:30:57Z")

</div>

Closed on February 12, 2024, 10:30pm UTC


