Forum Discussion
mattias-skog
Feb 27, 2023Iron Contributor
How do I create a roster plan?
Hello everyone! There are instructions on Microsoft Learn website on how to add remembers to roster plans, and how to remove members, but how do you actually create a roster plan?
Access Microsoft Planner Roster - Microsoft Planner | Microsoft Learn
- RDogPinKCopper ContributorHello everyone,
by now it is possible to directly create a Roster Plan via the Planner Web UI, just create a new plan without selecting an existing group.- JohnMoore33Brass Contributor
- mattias-skogIron ContributorSorry, RDogPinK, that is not creating a roster plan. It creates a normal plan with a Microsoft 365 group etc in the background. A Roster plan doesn't have that!
- RDogPinKCopper ContributorOh you are right, so the UI creating a plan out of the planner app is just misleading now...
I just saw the new plan in the planner app without the assignment of a separate group.
JohnMoore33 : Sadly, Roster plans are still not available. Regarding your issue, looks like you are not allowed to create groups in general.
- Anton DorfmannCopper Contributor
mattias-skog It seems that the roster functionality is bundled with MS loop. That expains also why there are no UI elements for this case. Just create a loop - task element and a container with a plan will be created.
- JohnMoore33Brass Contributor
Here my notes from investigating and testing this earlier. Hope it helps.
Microsoft has changed this by using Roster Containers:
- https://m365admin.handsontek.net/planners-new-roster-containers/
- This is managed via Graph APIs
- Roster: is the "security container" that holds the members and plans
- First create a Roster then create a Plan adding it to the Roster
- Creator of the Roster is automatically member.
- Additional Members to the Roster can be added via the Planner Web-UI
Planner Roster APIs:
https://learn.microsoft.com/en-us/graph/api/planner-post-rosters?view=graph-rest-beta&tabs=http
Create Roster
POST https://graph.microsoft.com/beta/planner/rosters Content-Type: application/json { "@odata.type": "#microsoft.graph.plannerRoster" }
Create Plan in Roster
You need to follow the documentation to create a Roster, then you can create a Plan by calling a POST to beta/planner/plans with a request body like this:
{ "container": { "@odata.type": "microsoft.graph.plannerPlanContainer", "containerId": "{RosterID}", "type": "roster" }, "title": "My Roster" }
Testing
Use the Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph to test
Utalising Power Platform
Power Automate can be used to build a solution to create rosters (while waiting for MS to create UI options in planner)
- Create app registration (needed for the Flow to access graph
- Create a List in SharePoint for requesting new Rosters (Plan Name, and owner of Plan)
- Create a Power Automate Flow when new list item is created, to create a roster (using APIs above) and create a plan in the Roster and adding the owner as member (use this as example using the above APIs)
Check if roster is enabled via Powershell
- It is by default
- https://learn.microsoft.com/en-us/office365/planner/prerequisites-for-powershell
- Get-PlannerConfiguration
- Piyush_MistryCopper Contributor
JohnMoore33 Thanks for the info this was very helpful! I used your info to convert this into a set of PowerShell commands for anyone to try:
#Import Modules if needed Import-Module Microsoft.Graph.Beta.Planner #Connect to Graph with your credentials Connect-MgGraph -Scopes "Tasks.ReadWrite" #Capture Name of Planner $Title = Read-Host -Prompt 'What is the Roster Plan name?' $params = @{ "@odata.type" = "#microsoft.graph.plannerRoster" } #Save to variable to capture containerID for later $ContainerID = New-MgBetaPlannerRoster -BodyParameter $params $params = @{ container = @{ "@odata.type" = "microsoft.graph.plannerPlanContainer" #Use saved ContainerID "containerId" = $ContainerID.Id "type" = "roster" } title = $Title } New-MgBetaPlannerPlan -BodyParameter $params
- Anton DorfmannCopper ContributorPiyush_Mistry should'nt this new roster plan show up in planner somewhere? I´ve created some and added also my user as owner and member, but no luck. Do ou have an idea?