cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brendan1
Level: Powered On

Exporting the Assigned To user ID from Planner

Hi,

 

I am very new to flows and having trouble exporting data from Microsoft Planner to Excel. In particular, I'm struggling to export the "AssignedTo" value.

 

I am trying to get the assignment user id that I have highlighted in red in the example output below. 

NOTE: I have modified the ID's below and put fake ones in.

 

I have attempted doing this a few different ways but haven't been successful. Any help would be appreciated. Please keep in mind I'm very new to Flows when answering!

 

{
"@odata.etag": "W/\"JzEtVGFzayBjQBAQABAQEBBQEBAQEBBTCc=\"",
"planId": "WaLGmV4PIk6RjT5G_PvpmcgAEjHg",
"bucketId": "6ObcKGw9EhyhgOwyHvoNtLgAHjEF",
"title": "Combination Hot/Cold display",
"orderHint": "8586641803150384312",
"assigneePriority": "",
"percentComplete": 50,
"startDateTime": "2018-07-01T10:00:00Z",
"createdDateTime": "2018-09-20T06:56:10.4391495Z",
"dueDateTime": "2018-11-30T10:00:00Z",
"hasDescription": true,
"previewType": "automatic",
"completedDateTime": null,
"completedBy": null,
"referenceCount": 0,
"checklistItemCount": 4,
"activeChecklistItemCount": 0,
"conversationThreadId": null,
"id": "YaGWwlh7f0GFNuKKtVn_8MeTK6HA",
"createdBy": {
"user": {
"displayName": null,
"id": "b0657828-bbc0-4bf4-a385-fe44aa1232e0"
}
},
"appliedCategories": {
"category2": true
},
"assignments": {
"35cba696-4a0f-4563-bc08-75f98ea781ca": {
"@odata.type": "#microsoft.graph.plannerAssignment",
"assignedDateTime": "2018-09-20T07:00:02.2516657Z",
"orderHint": "",
"assignedBy": {
"user": {
"displayName": null,
"id": "e0914448-9ac0-4ba0-a343-fd49ae5582b1"
}
}
},

 

 

Flow Screenshot.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
brendan1
Level: Powered On

Re: Exporting the Assigned To user ID from Planner

Hi Barry,

 

Thanks for your detailed response, it's much appreciated. I think i'm going to try your response just to learn Flow better!

 

After alot of searching I did come accross this post which was very useful:

https://powerusers.microsoft.com/t5/Flow-Ideas/access-to-assignee-parameter-in-planner-Tasks/idi-p/4...

 

The trick they used was to use the below expression in a "Get User Profile" action:

 

substring(string(items('Apply_to_each_2')?['assignments']), 2, 36)

 

This gets the "Assigned To" user very easily.

 

Regards,

Brendan.

 

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Exporting the Assigned To user ID from Planner

Hi @brendan1,

 

Currently Flow does not have a direct action to get the value of Planner task-Assigned to, If you would like the feature within Microsoft flow, you could vote for the similar ideal in the forum below:

https://powerusers.microsoft.com/t5/Flow-Ideas/Planner-get-more-details-from-a-task-in-planner-e-g-C...

In addition, I have a method here that you may consider using it, but there seems to be some flaws. I will post here first, maybe it could give you some tips.

The basic idea:

Because these Connectors are for members of the group, you can use Search for user to get the ids of all the people in the group and then store them in an array.

Traverse the array and then check if the output value of the list tasks contains the elements of the array. If so, the elements of this array are the id values we are looking for.

 

Flow configuration:

    Create two variables, one for all user ids and one for assigned user id

66.PNG

Get all the information of the task, use Parse JSON to parse the properties of a task object, you could first output the body of the List tasks, then fill the details of the first task into the "Use sample payload to generate schema" to get json Format, or directly paste the contents of the txt file in the attachment in the Schema.

68.PNG

Traverse all the user ids stored before, check if the assigns attribute contains the elements in the array, and include the element in another array.

     The reason for setting up another array is that the task may be assigned to multiple users, so you need to use Append to array variable to collect the ids of all assigned people.

     Compose is the id of the person assigned in a task.

     Every time you traverse the contents of the list tasks body, you need to empty the array ID once.

70.PNG71.PNG

 

The problem here is that the assignments attribute should also contain an assignedBy user id, which will be appended to the array ID, but it seems to have not been affected during the test.

Anyway, you can give it a try, this is my original idea.

 

Best Regards,

Barry

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
brendan1
Level: Powered On

Re: Exporting the Assigned To user ID from Planner

Hi Barry,

 

Thanks for your detailed response, it's much appreciated. I think i'm going to try your response just to learn Flow better!

 

After alot of searching I did come accross this post which was very useful:

https://powerusers.microsoft.com/t5/Flow-Ideas/access-to-assignee-parameter-in-planner-Tasks/idi-p/4...

 

The trick they used was to use the below expression in a "Get User Profile" action:

 

substring(string(items('Apply_to_each_2')?['assignments']), 2, 36)

 

This gets the "Assigned To" user very easily.

 

Regards,

Brendan.

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 62 members 4,390 guests
Please welcome our newest community members: