0

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!

Adil B
  • 14,635
  • 11
  • 60
  • 78
CptSternn
  • 41
  • 1
  • 6
  • You can get the plans for a user but not groups that have plans in a tenant. – rerun Oct 23 '18 at 22:29
  • That makes sense. So that would mean plans are attached to users specifically and not to groups. I will try searching against user accounts then. Thanks for that! – CptSternn Nov 02 '18 at 14:18
  • Plans are attached to groups but there isn't a query path to get that. If you call the beta endpoint for /me/Planner you will get back recent plan info which is all the plans you have recently visited. – rerun Nov 02 '18 at 17:33

0 Answers0