Forum Discussion
cdempsey-sonicules
Nov 30, 2023Copper Contributor
Best way to retrieve a list of all VE Communities via an API?
I am trying to retrieve the list of all VE Communities (Public and Private) in a network via an API. Based on the documentation here About the Yammer REST API - Yammer | Microsoft Learn I have ...
- Dec 09, 2023You are correct! I was looking at an old script I had! So you've probably already solved this, but I'll post how to do it if anyone else get's stuck
So what you need to do is query group and then filter out creationOption, as you can't filter out only Yammer in a single query due to creationOption not being visable 🙂
This will return all groups and their creationOption:
https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/any(a:a eq 'unified')&$select=id,displayName,creationOptions,resourceProvisioningOptions&$top=999
Dec 02, 2023
As you probably have native mode enabled, you can just get all unified group and check if they're yammer/engage enabled
Get-UnifiedGroup -ResultSize Unlimited | Where-Object {$_.GroupSku -eq "Yammer"}
Get-UnifiedGroup -ResultSize Unlimited | Where-Object {$_.GroupSku -eq "Yammer"}
- cdempsey-soniculesDec 03, 2023Copper ContributorHi NicolasKheirallah
Thanks for your response!
I wonder if there is any way to do this via the microsoft graph api directly rather than via PowerShell?
Sorry, I should have been more precise in my original post- Dec 04, 2023https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/any(g:g eq 'Unified') and resourceBehaviorOptions/any(r:r+eq+'YammerProvisioning')
Should do it- cdempsey-soniculesDec 06, 2023Copper ContributorUnfortunately this does not work. I have ran this against my tenant and the YammerProvisioning behavior option is not filled. In fact the value appears to be set as part of this property "creationOptions": [
"YammerProvisioning"
],
This is not consistently set as mentioned here https://learn.microsoft.com/en-us/answers/questions/389039/extract-all-microsoft-365-groups-that-were-provisi