c# - 如何使用 Graph API 获取类分配列表?
问题描述
当我执行这个:
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var assignments = await graphClient
.Education
.Classes["classId"]
.Assignments
.Request()
.GetAsync();
它返回此错误:
IEducationClassRequestBuilder 不包含“作业”的定义,也没有可扩展的定义方法...
但是从Graph Expolorer调用以下命令会返回预期的分配列表。
https://graph.microsoft.com/beta/education/classes/{id}/assignments
请问有什么指点吗?用完头发拉出LOL,干杯
解决方案
educationAssignment
资源和端点仍处于 Beta 阶段,因此不包含在主要的Microsoft Graph .NET 客户端库中。
为了访问 Beta 资源/端点,您需要Microsoft Graph Beta .NET Client Library。