Hi,
We use Auth0.ManagementApi package in a C# project, I try to get an IPagedList of OrganizationMember for some kind of organization’s user management. I get the list successfully, but the IList in all OrganizationMember is null.
Based on this page, I supposed it could be not null.
My current method looks like this:
var client = await ClientFactory.GetClientAsync("read:organization_member_roles read:roles");
Auth0ManagementApi.Paging.IPagedList<Auth0ManagementApi.Models.OrganizationMember> members = await client.Organizations.GetAllMembersAsync(organizationId, new Auth0ManagementApi.Paging.PaginationInfo(0, 100, true));
foreach (var member in members)
{
Console.WriteLine(member.Name);
if (member.Roles != null)
{
if (member.Roles.Count > 0)
{
foreach (var role in member.Roles)
{
Console.WriteLine($"{role.Name}");
}
}
else
{
Console.WriteLine("No roles found");
}
}
else
{
Console.WriteLine("Roles is null");
}
}