# Error using offset

**URL:** <https://developer.sailpoint.com/discuss/t/error-using-offset/3361>\
**Category:** SHF Discussion and Questions\
**Created:** [March 11, 2022, 4:55pm UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361 "2022-03-11T16:55:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruschel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@ruschel](https://developer.sailpoint.com/discuss/u/ruschel)\
**Post date:** [March 11, 2022, 4:55pm UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361/1 "2022-03-11T16:55:45Z")

</div>

I’m trying to create a service to get the list and datas from access-profiles.

When I send offset 0 and after offset 1, both request return always the same content.

For example…

{{baseUrl}}/beta/access-profiles?offset=1&sorters=name&count=true  
{{baseUrl}}/beta/access-profiles?offset=2&sorters=name&count=true

Tkz

---

<div class="post-metadata">

**Author:** ![briane\_bullock](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@briane\_bullock](https://developer.sailpoint.com/discuss/u/briane_bullock)\
**Post date:** [March 12, 2022, 12:07am UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361/2 "2022-03-12T00:07:10Z")

</div>

The offset parameter is usually set along with the limit parameter to paginate results. The default value for the limit parameter should be 50. So, if I’m understanding correctly, you seem to be asking for the first 50 access profiles with your first request and access profiles 51 - 100 with your second request. If you have less than 50 access profiles in your tenant, I would expect that IdentityNow will return the last “page” of results under your request parameters. That is, I’d expect that the results for the first request would match the results of the second request.

Try explicitly setting the limit parameter to something small (maybe even 1) and sending both requests again. You should see different results.

---

<div class="post-metadata">

**Author:** ![ruschel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@ruschel](https://developer.sailpoint.com/discuss/u/ruschel)\
**Post date:** [March 14, 2022, 11:55am UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361/3 "2022-03-14T11:55:12Z")

</div>

hello bbullock,

I have more than 300 AccessProfiles, if I send twice using limit 10 and offset 1 and 2. Some AccessProfiles come with repeats. That’s my problem.

For example the same AccessProfile ID: 2c91808674bc12010174c5b14b351b12 returned in the 2 rest requests (with offset=1 and with offset=2)

---

<div class="post-metadata">

**Author:** ![briane\_bullock](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@briane\_bullock](https://developer.sailpoint.com/discuss/u/briane_bullock)\
**Post date:** [March 21, 2022, 9:23pm UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361/4 "2022-03-21T21:23:05Z")

</div>

Sorry for the delay on this, I must have missed the notification of your response…

What you’re describing is exactly what I’d expect to see. If you want to paginate, set your offset to the same value as your limit. So, the first request (to get the first page of results) would have limit=SOME\_VALUE and offset=0. The second request (to get the second page of results) would have the same limit=SOME\_VALUE and offset=SOME\_VALUE. The third request (to get the third page of results) would have the same limit=SOME\_VALUE and offset=2\*SOME\_VALUE. Etcetera for each page of results.

The key is that the offset value is not a page offset, but a record offset.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:22pm UTC](https://developer.sailpoint.com/discuss/t/error-using-offset/3361/5 "2023-07-19T14:22:45Z")

</div>


