I am planning to leverage List Groups Ms graph API to list O365 groups in my organization and, later filter them for Yammer groups.
When I use this API in graph explorer it returns following response object.
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/groups?,
"value": [
{
"id": "",
"description": "",
"displayName": "",
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "",
"mailEnabled": true,
"mailNickname": "",
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"proxyAddresses": [
"",
"SMTP:",
"smtp:"
],
"renewedDateTime": "2018-09-07T16:23:37Z",
"onPremisesProvisioningErrors": []
},
{
"id": "",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2019-01-11T17:34:30Z",
"**creationOptions**": [
"Team",
"ExchangeProvisioningFlags"
],
"description": "Discuss",
"displayName": "I&O",
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "",
"preferredDataLocation": null,
"proxyAddresses": [
"SPO",
"SMTP:",
"smtp:"
],
"renewedDateTime": "2019-01-11T17:34:30Z",
"resourceBehaviorOptions": [],
"resourceProvisioningOptions": [
"Team"
],
"onPremisesProvisioningErrors": []
},
{
"id": "",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2018-12-10T21:14:47Z",
"**creationOptions**": [
"YammerProvisioning"
],
"description": "",
"displayName": "",
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mailEnabled": true,
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"proxyAddresses": [],
"renewedDateTime": "2018-12-10T21:14:47Z",
"resourceBehaviorOptions": [
"CalendarMemberReadOnly"
],
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": []
}
]
}
As you can see each object in json has 'creationOptions', that means a group might have this field populated with some value. I am interested to return only those groups where creationOptions = YammerProvisioning.
But $filter could only applied on string and not on array so I am not sure how would right that query. I tried following but, its Invalid filter clause.
https://graph.microsoft.com/v1.0/groups?$filter=equals(creationOptions,'YammerProvisioning')
Another approach I tried is as follows, it gave same array.
https://graph.microsoft.com/v1.0/groups?$filter=startswith(creationOptions,['YammerProvisioning'])
My goal is to simple fetch all the groups having creationOptions as 'YammerProvisioning'
An help or examples are appreciated :) Thanks