不支持"Microsoft.Graph.GraphServiceUsersCollectionResponse.Value"上的集合类型"Microsoft.Graph.IGraphServiceUsersCollectionPage" [英] The collection type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' on 'Microsoft.Graph.GraphServiceUsersCollectionResponse.Value' is not supported

查看:47
本文介绍了不支持"Microsoft.Graph.GraphServiceUsersCollectionResponse.Value"上的集合类型"Microsoft.Graph.IGraphServiceUsersCollectionPage"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图根据提供的代码示例

I am trying to get list of Azure AD B2C users based on code sample provided Here.

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var users = await graphClient.Users
    .Request()
    .GetAsync();

当我尝试使用.Net核心控制台应用程序或.Net核心Web应用程序时,正在按预期加载用户.但是我需要在.net核心类库项目中加载用户.(具体的天蓝色功能项目).但是,.net核心类库中的相同代码在获取用户时会低于预期.

Which is loading users as expected when I try with .Net core console application or .Net core web application. But I need to load users in .net core class library project. (Azure function project to be specific). But same code in .net core class library throws below expection while fetching user.

System.Private.CoreLib:执行函数MainFunction时发生异常.System.Text.Json:不支持"Microsoft.Graph.GraphServiceUsersCollectionResponse.Value"上的集合类型"Microsoft.Graph.IGraphServiceUsersCollectionPage".

System.Private.CoreLib: Exception while executing function: MainFunction. System.Text.Json: The collection type 'Microsoft.Graph.IGraphServiceUsersCollectionPage' on 'Microsoft.Graph.GraphServiceUsersCollectionResponse.Value' is not supported.

我找不到与该错误有关的任何文档或原因.有人可以帮我吗?

I could not figure out any document or cause related to this error. Can anybody help me with this?

推荐答案

我今天遇到了完全相同的问题,但是我将所有NuGet软件包更新为最新的预发行版本,并且现在可以正常工作.

I've had the exact same problem today but I updated all NuGet packages to latest pre-release versions and it's now working.

这篇关于不支持"Microsoft.Graph.GraphServiceUsersCollectionResponse.Value"上的集合类型"Microsoft.Graph.IGraphServiceUsersCollectionPage"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆