简体   繁体   中英

Create planner task with description

I'm trying to create a planner task with a description through the Graph API.

AFAICS, this has to be done in three steps. 1. Create the new task 2. Read the taskdetails of the new task, to get the Etag value, which is necessary for updating the details 3. Update the taskdetails with the description.

My problem is, that step 2. (reading the taskdetails) immediately after creating the task fails. I get a "404 not found" response.

When I step through the debugger, it works fine, if I wait for some seconds before I execute the step, that reads the task details, but under normal circumstances my application seems to be too fast. A Thread.Sleep() for some seconds will help as well, but isn't there another way to solve this?

AFAIK situation is still same and only workaround is to sleep and retry until you get proper response.

So getting taskdetail immediately after creating a task can return not found. And this behavior is not consistent so it might work OK for X times and then fail.

This applies both to manual HTTP requests and to Microsoft Graph Client Library for .NET

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM