MS Planner Graph API - Planner Task Details Not Being Created via HTTP request

aaloang 20 Reputation points
2025-02-12T03:25:42.92+00:00

I'm using Google Apps Script to create tasks in Microsoft Planner with HTTP requests. I can create a task but can't create or update the task description.

Initially, I've tried populating the task description in the initial post request to create the task.

I used the following payload, which works properly when using the Graph API Explorer.

  var payload = {
    "planId": planId,
    "title": planTitle,
    "details": {
      "description": taskDescription
    }
  };

I've also tried updating the task details after creating a new task, as well as updating the task details of an existing task.

I get no error message, but I've found that null values are being passed into details.

However, I'm also checking my access token and I have the permissions deemed necessary in the documentation.

  "roles": [
    "Group.ReadWrite.All",
    "Tasks.ReadWrite.All"
  ],

Is there anything else I can try?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,303 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 10,555 Reputation points Microsoft External Staff
    2025-02-12T07:07:05.0933333+00:00

    Hello aaloang,

    Thank you for reaching out to Microsoft Support!

    In response to your question, the permissions you granted were fine, and we tested them in Graph Explorer, everything worked fine, and the test results are as follows:

    Screenshot 2025-02-12 070306

    Screenshot 2025-02-12 070440

    Note that when updating description, the If-Match parameter in the request header is required:

    User's image

    Reference document:

    https://learn.microsoft.com/en-us/graph/api/plannertaskdetails-update?view=graph-rest-1.0&tabs=http

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.