相关疑难解决方法(0)

Microsoft Graph 仅返回前 100 个用户

我有以下代码,它根据过滤器返回所有用户。问题是它只返回 100 个用户,但我知道还有更多。

private List<User> GetUsersFromGraph()
{
    if (_graphAPIConnectionDetails == null) ReadParametersFromXML();
    if (graphServiceClient == null) graphServiceClient = CreateGraphServiceClient();

    var users = graphServiceClient
        .Users
        .Request()
        .Filter(_graphAPIConnectionDetails.UserFilter)
        .Select(_graphAPIConnectionDetails.UserAttributes)
        .GetAsync()
        .Result
        .ToList<User>();

    return users;
}
Run Code Online (Sandbox Code Playgroud)

该方法仅返回 100 个用户对象。我的 Azure 门户管理员报告说应该接近 60,000。

c# microsoft-graph-sdks microsoft-graph-api

3
推荐指数
1
解决办法
3104
查看次数