I am trying to get a list of all plans currently on an Office 365 tenant.
I am somewhat familiar with the API and have used Microsoft graph and have written a script in Powershell that automatically authenticate, return a list of all groups, pulls the ExternalDirectoryObjectId from those groups, but now I seem to be hitting a wall.
I would like to check those groups for the existence of plans. Currently after I am connected and have gotten my token, I can query the following URL as a test:
https://graph.windows.net/$Tenant/groups/?api-version=beta
This returns a list of the groups so I know I am connected and the token is ok.
I am using the following code with the above URL to display a list of groups with a few fields:
Invoke-RestMethod -Uri $URL -Headers $GraphToken -Method Get
-ContentType 'application/json' | Select-Object
-ExpandProperty Value | ft DisplayName, mail, ObjectID
Would anyone know if it is possible to return a list of groups that are using planner and if so what would I be looking for? Or is there a way to query against Planner directly that I am missing?
Thanks in advance!