Logo
  • Contact form
  • Events & slides
  • Buy me a snack
Logo

Events & slides

Buy me a snack

Contact form

Data privacy policy

About

This blog is made with β™₯️ on Notion and made public with Super.so. Rocket icon created by RIkas Dzihab - Flaticon.

RedditLinkedIn
πŸ‘‹πŸ»
/
πŸ“
All Blogs
/Create personal Planner plans (with rosters) using the Graph API
Create personal Planner plans (with rosters) using the Graph API
Create personal Planner plans (with rosters) using the Graph API

Create personal Planner plans (with rosters) using the Graph API

Table of contents

  • What are personal Planner plans?
  • Create a private Planner plans
  • Graph Explorer
  • Create roster
  • Create plan in roster
  • Add user to roster plan
  • Delete creator from roster
  • Open plan, if not shown automatically
  • Power Automate
β›”
There is a user interface now available. You can user the planner web or Teams to create private plans. Simply create a new planner and do not select a group for. Tada, your plan is a private plan only available to you.

What are personal Planner plans?

Planner plans usually always connect to a Microsoft 365 group. Therefore, all members of that group have access to all plans associated with that group. For now the only workaround for private Kanban board style task management was Microsoft Lists. Microsoft introduced roster plans almost 4 years ago and now finally allowed plans to be created.

A roster is simply a β€œlightweight” group and can contain one or many users. It even accepts sensitivity labels to protect its contents.

Create a private Planner plans

Graph Explorer

⚠️
You can use the graph explorer for easy access. If you prefer other ways to access the Microsoft Graph API, you can also use tools like Postman. I recommend using Graph Explorer since its very easy to use. If you sign in as a global administrator, you will be able to grant permission to the graph explorer for the Planner API endpoint. Sign in here: Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph

Create roster

First, we need to create a roster using the following parameters:

Method: POST

Url: https://graph.microsoft.com/beta/planner/rosters

Body:

{
  "@odata.type": "#microsoft.graph.plannerRoster"
}
πŸ‘‰
Write down the value for β€œid”. This is your RosterId.

Create plan in roster

πŸ’‘
Insert the RosterId (without curly brackets) from the previous API response above and choose the title of the plan. This can be changed later in the UI of planner.

Method: POST

Url: https://graph.microsoft.com/beta/planner/plans

Body:

{
"container": {
"@odata.type": "microsoft.graph.plannerPlanContainer",
"containerId": "{RosterId}",
"type": "roster"
},
"title": "Roberts super secret tasks"
}
πŸ‘‰
Write down the value for β€œid”. This is your PlanId, that you can use to access this planner in your web browser.

Add user to roster plan

πŸ’‘
The UserId is a unique number of each user ia Azure Active Directory or entra. Head to the Entra portal to find the id of the user, which you want to grant access to the plan.

Method: POST

Url: https://graph.microsoft.com/beta/planner/rosters/{RosterId}/members

{
  "@odata.type": "#microsoft.graph.plannerRosterMember",
  "userId": "{UserId}"
}

Delete creator from roster

πŸ’‘
Again, you will need to use the users id from Entra portal to remove access.

Method: DELETE

Url: https://graph.microsoft.com/beta/planner/rosters/{RosterID}/members/{UserId}

  • If successful, it will return β€œNo Content - 204” and no response body.

Open plan, if not shown automatically

It takes a while for the plan to become visible to the users. If its not fast enough, you can use the PlanId from above to access it directly inside your browser. Teams and the mobile applications should follow shortly after.

  1. Open https://tasks.office.com and sign in.
  2. Open a random planner plan. If you don’t have one, proceed with 3.
  3. The Url should now look something like this: https://tasks.office.com/{TENANTDOMAIN}/en-US/Home/Planner/#/plantaskboard?groupId=…&planId=…

  4. Change the Url as follow and insert you PlanId from above: https://tasks.office.com/{TENANTDOMAIN}/en-US/Home/Planner/#/?planId={PlanId}
  5. This will open the plan in your browser directly.

Power Automate

If you cannot wait until the UI is finally there, you might think about creating a Forms to allow users to request private plans. From there a flow gets triggered from Forms that uses the HTTP actions and an app registration in Entra to perform all the tasks from above. If you need help creating this flow, contact me πŸ™‚