On the basis of outlook task example give here, I am trying to fetch all task/plan in planner associated with a user.

I am not sure if it is the right approach / set of code to fetching it.

While fetching outlook task by its "Subject", but now planner doesn't give any outcome with "Subject" key word. I even tried with "Title" instead of subject but its not recognizing "title" keyword.

Using Render function to call Graph API:

enter image description here

Here _renderEmailfunction is defined:

Getting an error at message[index].title in code:

enter image description here

  • 1
    Hi @abhishek23, did you try my suggestion given below? Is it working for you now? Feb 15, 2021 at 12:16

2 Answers 2


I suggest you use Microsoft Graph Toolkit in SPFx, it has an OOB componment mgt-tasks that could display the signed-in user's Microsoft Planner tasks.

enter image description here

And here is a demo about how to get started with Toolkit in SPFx:


As per the documentation at: plannerTask resource type, sample response for planner task will be like:

  "activeChecklistItemCount": 1024,
  "appliedCategories": {"@odata.type": "microsoft.graph.plannerAppliedCategories"},
  "assigneePriority": "String",
  "assignments": {"@odata.type": "microsoft.graph.plannerAssignments"},
  "bucketId": "String",
  "checklistItemCount": 1024,
  "completedBy": {"@odata.type": "microsoft.graph.identitySet"},
  "completedDateTime": "String (timestamp)",
  "conversationThreadId": "String",
  "createdBy": {"@odata.type": "microsoft.graph.identitySet"},
  "createdDateTime": "String (timestamp)",
  "dueDateTime": "String (timestamp)",
  "hasDescription": true,
  "id": "String (identifier)",
  "orderHint": "String",
  "percentComplete": 1024,
  "planId": "String",
  "previewType": "String",
  "referenceCount": 1024,
  "startDateTime": "String (timestamp)",
  "title": "String"

Which has title in it. Also, I tried it using Graph explorer and I am able to see the title of planner task like:

enter image description here

So, my guess the issue is with your data type of messages array you mentioned: MicrosoftGraph.Message[].

Check the correct data type of planner task (from Microsoft graph library) and use it OR

Create a props with the required properties you need from planner task and use it like given at: SPFx sample - personalTasks

  • Hi @abhishek, did you try this? does this answers your question? If Yes, Please Upvote(^) and accept as an Answer as it will help others to find the correct answer easily. It will also remove this question from "Unanswered questions" list Feb 22, 2021 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.