SOLVED

Planner API

Brass Contributor

Is it possible to list all plans in the planner hub using the API?  It looks like it wants a group id.

 

https://graph.microsoft.com/v1.0/groups/{group-id-with-plan}/planner/plans

 

Thanks.

5 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution
It is not possible to retrieve all the plans directly without using group-id. But you can reterive the user's favorite plans using the below API.

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/planneruser_list_favoritepla...

Thanks.  I was asked to get all the plans out to do some reporting.  Would I be able to use flow to capture certain aspects of the plan and send it into another source that I could use for this kind of reporting?

This article by Brian Smith looks like it has everything I need.

 

Microsoft Planner: Considerations for Reporting–Part 1

 

Thanks again for your help.

My requirement is the pull the report of Assignee .. Task Name and ID when I give the Planner Name. 

 

In-order to achieve, i found that we need to iterate the Group ID.. then Plan ID... and then get all task details.

 

I was trying to iterate the Group ID from https://graph.microsoft.com/v1.0/groups?$filter = displayName eq 'Planner Name' where I got the details. From this query, i gave my input for https://graph.microsoft.com/v1.0/groups/GroupID/planner/plans. where it works in Graph Explorer API but when i tried through PowerShell IDE. It throws 401 unauthorized. I tried to re-authorize again through Connect-PNPOnline it works but didn't help me in PowerShell IDE. 

 

Could you someone help me out. whether nested looping group ID, Plan ID is possible.

t is possible - but there is an assumption that you have permission on all the plans - sounds like this might not be the case if you get a 401.  I think there are plans for a reporting API at some point that will help with a lot of these types of requests.  UserVoice is a good place to register your interest.  https://planner.uservoice.com/forums/330525-microsoft-planner-feedback-forum 

Best regards,

Brian

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution
It is not possible to retrieve all the plans directly without using group-id. But you can reterive the user's favorite plans using the below API.

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/planneruser_list_favoritepla...

View solution in original post