Forum Discussion

  • RDogPinK's avatar
    RDogPinK
    Copper Contributor
    Hello 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.
    • JohnMoore33's avatar
      JohnMoore33
      Brass Contributor

      RDogPinK Can you explain?

       

      For me it still doesn't work if MS365 group creation is disabled

       

    • mattias-skog's avatar
      mattias-skog
      Iron Contributor
      Sorry, 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!
      • RDogPinK's avatar
        RDogPinK
        Copper Contributor
        Oh 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 Dorfmann's avatar
    Anton Dorfmann
    Copper 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. 

  • JohnMoore33's avatar
    JohnMoore33
    Brass Contributor

    mattias-skog 

     

    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"
    }

     

    From <https://techcommunity.microsoft.com/t5/microsoft-365/preparing-for-planner-s-new-roster-containers/m-p/2222287>

     

    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

    • Piyush_Mistry's avatar
      Piyush_Mistry
      Copper 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 Dorfmann's avatar
        Anton Dorfmann
        Copper Contributor
        Piyush_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?

Resources