# Okta.Sdk UsersList / User missing next link access and missing next link from response

**URL:** <https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084>\
**Category:** API\
**Tags:** dotnet\
**Created:** [July 3, 2018, 1:45pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084 "2018-07-03T13:45:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricWilson](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EricWilson](https://devforum.okta.com/u/EricWilson)\
**Post date:** [July 3, 2018, 1:45pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/1 "2018-07-03T13:45:13Z")

</div>

When getting user via okaClient.UserList, I don’t see a way to get the next link from the API. I also don’t see the \_next link when issuing a Rest call from postman.

c# code. I don’t see a way to find the links. FYI - i’m returning the data and storing it in a general IUser in our system not the same as your IUser

```auto
 var oktaUsers = _provider.OktaClient.Users.ListUsers(query,after, limit, filter, format, search, expand);
            
            var list = new List<IUser>();

            await oktaUsers.ForEachAsync(u =>
                {
                    list.Add(new User() { Id = u.Id, FirstName = u.Profile.FirstName, LastName = u.Profile.LastName, Email = u.Profile.Email, Login = u.Profile.Login });                    
                }

             );

```

Postman response (sensitive data xxx’d out) and response shorten for brevity

```auto
"_links": {
            "self": {
                "href": "https://dev-xxxxx.oktapreview.com/api/v1/users/xxxxx"
            }
        }

```

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [July 9, 2018, 4:36pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/2 "2018-07-09T16:36:41Z")

</div>

It should be in the link header:  
[https://developer.okta.com/docs/api/getting\_started/design\_principles#link-header](https://developer.okta.com/docs/api/getting_started/design_principles#link-header)

---

<div class="post-metadata">

**Author:** ![EricWilson](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EricWilson](https://devforum.okta.com/u/EricWilson)\
**Post date:** [July 10, 2018, 1:34pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/3 "2018-07-10T13:34:35Z")

</div>

Thanks! I found it in the headers (in postman). Is there a way to access it from the Okta.Sdk when pulling back a list of users or do I need to manage/create my own request and parse it that way?

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [July 10, 2018, 6:01pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/4 "2018-07-10T18:01:46Z")

</div>

@nate.barbettini do you happen to know?

---

<div class="post-metadata">

**Author:** ![nate.barbettini](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/nate.barbettini/32/385_2.png) [@nate.barbettini](https://devforum.okta.com/u/nate.barbettini)\
**Post date:** [July 10, 2018, 8:43pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/5 "2018-07-10T20:43:35Z")

</div>

Hey @EricWilson! The SDK doesn’t currently expose the headers, but see this Github issue (and the linked PR) for how we might make this possible soon: [https://github.com/okta/okta-sdk-dotnet/issues/222](https://github.com/okta/okta-sdk-dotnet/issues/222)

What do you need to do in your code with the `next` link? If you just need to run some code on each user, this should be sufficient:

```
await client.Users.ForEachAsync(user =>
{
    // do something with each user
});
```

---

<div class="post-metadata">

**Author:** ![EricWilson](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EricWilson](https://devforum.okta.com/u/EricWilson)\
**Post date:** [July 11, 2018, 12:41pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/6 "2018-07-11T12:41:38Z")

</div>

@nate.barbettini, thanks. I’m currently doing something similar, however the `next` link would be needed in cases where I don’t get all the users back in one call. This would allow me to `page` to the `next` set. Our UI, will talk to the Okta backend to pull users into our system. We’re managing the users authorization within the system itself (vs. authorization / claims stored in Okta). I’m guessing that the 200 limit (or increasing the request size) will work fine, but I’m trying cover all the bases. As a side note, ideally we’d like to pull / query users by Organizations (loaded into groups). I know I can pull the users from a particular group but I can’t add search/filter patterns on the users - this is a side note and I have another ticket on that issue.

---

<div class="post-metadata">

**Author:** ![nate.barbettini](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/nate.barbettini/32/385_2.png) [@nate.barbettini](https://devforum.okta.com/u/nate.barbettini)\
**Post date:** [July 19, 2018, 4:49pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/7 "2018-07-19T16:49:36Z")

</div>

> [@EricWilson](#):
>
> the `next` link would be needed in cases where I don’t get all the users back in one call. This would allow me to `page` to the `next` set. Our UI, will talk to the Okta backend to pull users into our system.

Just so I understand your system: do you want your UI to only show a page at a time (and pass that paging position over to Okta), or show all users at once?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2024, 10:47pm UTC](https://devforum.okta.com/t/okta-sdk-userslist-user-missing-next-link-access-and-missing-next-link-from-response/2084/8 "2024-01-12T22:47:52Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
