# Getting Roles as null while calling GetAllMembersAsync According to organization

**URL:** <https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277>\
**Category:** Get Help\
**Tags:** management-api, roles\
**Created:** [May 30, 2024, 11:43am UTC](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277 "2024-05-30T11:43:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.raj](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/amit.raj/32/56957_2.png) [@amit.raj](https://community.auth0.com/u/amit.raj)\
**Post date:** [May 30, 2024, 11:43am UTC](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277/1 "2024-05-30T11:43:50Z")

</div>

![image](https://global.discourse-cdn.com/auth0/original/3X/9/e/9e811f897858187778b0a2c908179ebac183bd1f.png)

And is there is any option by which i can activate or deactivate my organizational users.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [May 31, 2024, 7:36pm UTC](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277/3 "2024-05-31T19:36:36Z")

</div>

Hi @amit.raj,

Thanks for reaching out to the Auth0 Community!

I have just checked your tenant and found that you have 0 organizations configured.

Looking further, I found that your [users are assigned to the roles individually](https://auth0.com/docs/manage-users/access-control/configure-core-rbac) (not the same as Organization Roles).

In this case, you will need to call the `client.Users.GetRolesAsync(userId, pagination)` method to retrieve the assigned roles for a specific user.

See [Interface IUsersClient](https://auth0.github.io/auth0.net/api/Auth0.ManagementApi.Clients.IUsersClient.html#Auth0_ManagementApi_Clients_IUsersClient_GetRolesAsync_System_String_Auth0_ManagementApi_Paging_PaginationInfo_System_Threading_CancellationToken_) for your reference.

Let me know how this works for you.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 14, 2024, 7:37pm UTC](https://community.auth0.com/t/getting-roles-as-null-while-calling-getallmembersasync-according-to-organization/135277/4 "2024-06-14T19:37:16Z")

</div>

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