Microsoft Graph fails when updating orderHint for a Planner bucket RRS feed

  • Question

  • Hi,

    I'm trying to update a Planner bucket's order. To do that, I set the orderHint value of that bucket to be "<prevBucketOrderHint> <nextBucketOrderHint>!". This is the only change I make to the bucket object, however, when I try to save the changes, I get the following error:

    Validation for field 'PlanId', on entity 'Bucket' has failed: This field is read only and cannot be changed

    However, I'm not accessing nor modifying value of PlanId and therefore I don't understand why I get this error.

    Below you can find the code I use to achieve my task (note that this is a C# code using the SDK and variable gc is a valid instance of Microsoft.Graph.GraphServiceClient):

    theBucket.OrderHint = string.Format("{0} {1}!", previousBucket.OrderHint, nextBucket.OrderHint);
    var etag = theBucket.GetEtag();
    var result = gc.Planner.Buckets[bucketId].Request().Header("If-Match", etag).UpdateAsync(theBucket).Result;

    Do you see any mistake in my approach or, alternatively, do you have any suggestions on how to change the order of buckets in a Planner plan?


    Tuesday, June 5, 2018 10:16 AM