我在Microsoft Graph API(在C#中)遇到问题,我想创建一个新的OnlineMeeting,并且在创建元素时遇到未知错误。代码是:
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
var onlineMeeting = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse(theDateStart),
EndDateTime = DateTimeOffset.Parse(theDateEnd),
Subject = theSubject
};
try
{
var resultData = await graphClient.Users[this.clientID].OnlineMeetings
.Request()
.AddAsync(onlineMeeting);
this.meetingResponse = resultData;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
OnlineMeeting对象的值(按顺序)是:“ 2020-08-04T20:00:00.2444915 + 00:00”,“ 2020-08-04T20:30:00.2464912 + 00:00”,“用户令牌”结识新朋友。”
问题与authProvider权限无关,它可以正常工作,并且我具有设置用户ID(如代码中的用户电子邮件)的权限。
错误结果是:
Code: UnknownError
Inner error:
AdditionalData:
date: [a date]
request-id: **********-****-****-****-**********
ClientRequestId: **********-****-****-****-**********
Get calendar schedules with Graph API from C# service
感谢您的回复。