Cannot obtain Planner Roster ID via Graph PowerShell

Copper Contributor

Hi guys,
i created new roster in MS Planner to realize personal planner plans without using a M365-group.
I did it like this:

#Create a roster

 

$params = @{"@odata.type"="#microsoft.graph.plannerRoster"}
New-MgBetaPlannerRoster -BodyParameter $params

 

>>>>returing the roster ID

#Grant User Permission to the Roster using PlannerTenantAdmin.psm1 (Prerequisites for making Planner changes in Windows PowerShell - Microsoft Planner | Microsoft Learn)

 

Add-PlannerRosterMember -RosterId ff119d1b-0dfc-40d4-a79e-97e7f5******  -UserAadIdOrPrincipalName emailaddress 

 

#Then creating a plan within the roster

 

$plan=@{
container=@{
url="https://graph.microsoft.com/beta/planner/rosters/ff119d1b-0dfc-40d4-a79e-97e7f5******"
}
title="SH Private"
}

New-MgBetaPlannerPlan -BodyParameter $plan

 

>>>It works fine, now i have a private plan without creating a group. :smile:

 

Now....the "easy thing" that doen't work:

I created several roster. I'm the admin and now i'm the owner of the rosters. I have the priviledge the access them. Now i want to remove my account permission within the rosters of my colleagues. To reach this goal i want to use the command "remove-plannerrostermember" or another graph-cmdlet, but i neet the rosterId. Now the stupid thing: I can't find out the roster ids :sad:

With the command:

 

Get-MgBetaUserPlannerRosterPlan  -UserId be985***-16c7-4a74-8ad4-55be******

 

....the following output returns:

>>>>

Title Id Owner CreatedDateTime
----- -- ----- ---------------
XY Private vP4D3p-h20iu0XP00Q******* be985***-16c7-4a74-8ad4-55b******* 27.02.2024 20:02:53
SH Private K7gITd4wDEeIkH9OMEteWp****** be985***-16c7-4a74-8ad4-55be****** 27.02.2024 19:36:49

<<<<<

i can see the plan id, but not the roster id!

With the command

 

Get-MgBetaPlannerRoster [-all]

 

it is not possible to list all rosters. An error message occurs:

>>>Get-MgBetaPlannerRoster : Specified expansions, filters, or select statements are not supported for this query.<<<

 

I haven't write down the roster ids, now i can't modify the permissions. Any idea?

 

1 Reply
Looks like there is no LIST method for rosters, so you need to know the rosterID beforehand. If you are using PS transcripts, you should be able to get the Ids therein. If not, look for the corresponding events in the Unified audit log.