Jul 30 2020
Need to get all list of Teams via Graph API,
I get the example of the filter to get groups with teams.
GET /groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')
Could anyone help to explain the above "/Any(x:x eq 'Team')"?
After using above example filter, I found the response is same like I didn't use the filter, still including all of groups which resourceProvisioningOptions are not 'Team',
so the filter seems to be not working.
below is my code looks like:
$uri = "https://graph.microsoft.com/beta/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')" $groups = GetGraphData($uri,$headerParams)
Jul 31 2020
It works fine here, make sure you're using the /beta endpoint though. Also, if running this against PowerShell or similar, make sure to escape all the relevant special chars ($ for example).
The other possibility is that all your M365 groups are team-enabled, in which case you will indeed get the same results with or without the filter :)