Set the task priority in Microsoft Planner using Power Automate

For quite a while I’ve been looking to set the task priority in Microsoft Planner when using Power Automate. The preview version of the Create a task actions can do this.

Create a task action

The Create a task action now has two versions, and the preview version allows you to set the priority to a value from 0 to 10.

Priority in Microsoft Planner using Power Automate
Priority in Microsoft Planner using Power Automate

That needs a bit of a zoom in. Due to the ridiculous datamodel used by the categories all the different categories take up a lot of the space. But I will leave that problem for another post on a different day.

Set the task priority in Microsoft Planner

All the way at the bottom there is the Priority field. From the tip in the edit box we can see that we are expected to supply a value between 0 and 10. I hear you say: “What?? 0 – 10”?

Set the task priority in Microsoft Planner using Power Automate
Set the task priority in Microsoft Planner using Power Automate 1

Indeed Planner only has 4 priorities. So why can we set this Priority field to 10 values?

4 priority options in Planner
4 priority options in Planner

To find out what is going on I create a flow and created a task for each priority in Microsoft Planner.

10 priority values in planner
10 priority values in planner

So I quite quickly found out that Priority 0 is Medium, 1 is Urgent. 2, 3 and 4 are important. And then for Priority 1, 6,7,8 and 10 there seems to be a bit of a confusion as the icon for Urgent is used while the priority may not be set to Urgent.

Looking at the create a task (preview) documentation I found quite quickly that the same as I initially discovered. And apparently 0 is Urgent, but I actually found that 0 is Medium.

Set the task priority in Microsoft Planner using Power Automate
Set the task priority in Microsoft Planner using Power Automate 2

However this doesn’t mention the alert being switched on. That alert settings seems to be a bit randomly spread across the different options anyway.

And looking at the beta version of the Graph API, I didn’t get any more information.

PriorityPriority in PlannerComments
0Medium
1Urgent
2Important
3Important
4Important
5Medium
6MediumBut the Urgent icon is used
7MediumBut the Urgent icon is used
8LowBut the Urgent icon is used
9Low
10LowBut the Urgent icon is used

As things are slightly confusing, I would probably only use the priority values for 1, 3, 5 and 9.

Retrieving the priority in Power Automate

Well that is not there yet, unless …

The reason why the Create a task action is in preview is because the Planner action uses the Beta version of the Graph API.

So I went over to the graph explorer and got to the details and I found the priority of my tasks .

Set the task priority in Microsoft Planner using Power Automate
Set the task priority in Microsoft Planner using Power Automate 3

All I had to do is use the following graph api end point:

https://graph.microsoft.com/beta/planner/tasks/7Pkry5zpnEq11gL20sWtvpcALMwf

So now we could get to the priority in Microsoft Planner for the task using an http request action to collect the priority of all the tasks.

Read the Microsoft Graph API and the Power Platform, the Ultimate Guide for more help on the Graph API within the Power Platform.

I remember quite a while back I asked for Planner’s priority to be made available in my post about Exporting Planner to Excel using Power Automate. It now looks like this feature is available. At least in the preview version of MS Graph.

FAQs

How many priorities are there in Planner?

Planner only knows Urgent, Important, Medium and Low. However, Planner’s APIs support 10 values for the priority field. Some of these priority values are reserved for future use.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

2 thoughts on “Set the task priority in Microsoft Planner using Power Automate

  1. Has anyone figured out how to use Pieters method to create multiple planner tasks with one http request? Iโ€™ve found it so much better for exporting to excel or pretty much anything else with large data sets.

    1. Hi Jason,

      Pieter’s method is more about creating an array out of an apply to each step. To then use that and create multiple tasks you would need an api call that can do that. The only option that we have here is the create task.

      You could now for example use the create task in an apply to each underneath then Pieter’s method compose action. to call this end point multiple times. Or you could have a child flow doing that.
      https://learn.microsoft.com/en-us/graph/api/planner-post-tasks?view=graph-rest-1.0&tabs=http

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.