Microsoft Graph Explorer Way To Manage Planner

Microsoft Graph API is a powerful API to fetch the data from all services across the Office 365 environment. If you have access and know the basic knowledge of Office 365 services, you can do a lot more than you can imagine.
 
Before we jump directly into the Planner, we must understand it and how it relates to Office 365.
 
Microsoft Planner is one of the services available under Office 365. This is used to create tasks and assign them to users in an Office 365 Group.
 
The collection of tasks for the team can be easily managed by the Plan under Microsoft Planner. And each Plan should be associated with any one of the Office 365 Groups. In simple words, this is nothing but the To-Do tasks for the group.
 
Microsoft Graph API supports the Microsoft Planner. We will see how to use Microsoft Graph Explorer V2 – Preview tool to create a Plan for the Office 365 group.
 
To create a Plan, we require the below mandatory information,
  • Group ID
  • Plan Title
To create a new Office 365 group in MS Graph Explorer, check out my article Microsoft Graph Explorer way to create Teams in Office 365
 
To get the exiting Office 365 group ID from your groups, run the below query in Microsoft graph Explorer.
  • URL: https://graph.microsoft.com/v1.0/groups
  • Http-Method: GET
From the response, note down any of the group ID from the list of groups.
 

Create a new Plan

  • Navigate to the Graph Explorer
  • Login to the tool using the button called Sign in Graph explorer
  • Select the POST method from Request dropdown
  • Select the version as v1.0
  • Enter the below Graph API endpoint for creating a new plan

    https://graph.microsoft.com/v1.0/planner/plans
  • Ensure below permission scope is consented

    • Group.ReadWrite.All
Microsoft Graph Explorer Way To Manage Planner
  • Enter the below valid JSON (replace <group id>) in a Request Body area
    1. {  
    2.    "owner":"<group id>",  
    3.    "title":"Sample Plan"  
    4. }  
Property
Remarks
owner
Office 365 Group Id
title
Display name for the Plan
  • After the json is entered, click Run Query button.
If the Group Id is valid and has valid permission, the tool creates a new Plan with the associated group.
 

Get the plans associated with the Office 365 Group

 
The below steps help to retrieve the list of plans associated with the single Office 365 Group,
  • Navigate to the Microsoft Graph Explorer
  • Ensure you have a login to the tool
  • Select the GET method from Request dropdown
  • Select the version as v1.0
  • Enter the below Graph API endpoint for creating a new plan

    https://graph.microsoft.com/v1.0/<group id>/planner/plans
  • Ensure any one of the below permission scope has consented

    • Group.Read.All
    • Group.ReadWrite.All
Microsoft Graph Explorer Way To Manage Planner
  • Click Run Query button
Under the Response preview, we can view the list of Plans associated with the Office 3656 group.
 
In the same way, we can retrieve the tasks associated with the plans and categorize the plan tasks with buckets. We will see those in upcoming articles...