[英]Retrieving attachments from Microsoft Planner tasks through Graph API
[英]Planner Tasks Graph API: Update Task Issue
我們開發了一個應用程序,它調用Update Task Planner Graph API來更新 Planner App 中的任務。 API 工作正常,直到 MS 文檔最近發生了一些變化,現在它一直拋出錯誤。
A type named 'microsoft.taskServices.plannerCheckListItemCollection' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.
下面是使用 Graph API 創建和更新任務的代碼。
var newTask = new PlannerTask
{
PlanId = "planID",
BucketId = "bucketID",
Title = "title"
};
Logger.LogInfo(userLogs + "Task object created, calling Graph API");
var taskResponse = await graphClient.Planner.Tasks.Request().AddAsync(newTask);
PlannerTaskDetails taskDetails = new PlannerTaskDetails
{
Checklist = new PlannerChecklistItems { AdditionalData = checkListItems }
};
Logger.LogInfo(userLogs + "Getting Details of created Task");
PlannerTaskDetails getTaskDetails = await graphClient.Planner.Tasks[taskResponse.Id].Details.Request().GetAsync();
var eTagId = getTaskDetails.GetEtag();
Logger.LogInfo(userLogs + "Updating Task");
await graphClient.Planner.Tasks[taskResponse.Id].Details.Request()
.Header("Prefer", "return=representation")
.Header("If-Match", eTagId)
.UpdateAsync(taskDetails);
CheckListItems的代碼片段:
Dictionary<string, Object> checkListItems = new Dictionary<string, object>();
checkListItems.Add(key, new PlannerChecklistItem
{
Title = "title",
IsChecked = True
});
Azure 中的適當應用程序權限也已經給出,因為這在上個月之前運行良好。
這是一個錯誤,現在應該解決這個問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.