Hi!
Thank you for your reply, however startsWith doesn't fit here.
displayName doesn't accept contains w.r.t this link https://learn.microsoft.com/en-us/graph/aad-advanced-queries?view=graph-rest-1.0&tabs=http
here is a screenshot with filter contains and count = true.
https://graph.microsoft.com/v1.0/groups?$filter=contains(displayName,'ariba')&$count=true&$expand=transitiveMembers($select =displayName,onPremisesSamAccountName)&$select=displayName,description
I already tried startsWith, however the requirement is to get the group names that contains Ariba keyword, so the options are either to use contains or search with $expand to get the group information along with transitiveMembers.
When we go with startsWith, we will miss the records that have Ariba in the middle of group i.e. "Contractor Ariba Users".
There is a way to fulfill the requirement, however this will definitely degrades the performance.
Here are the steps to follow:
- First call: get all group names that has Ariba keyword using https://graph.microsoft.com/v1.0/groups?$search="displayName:ariba"
- Loop through each record and call the second API https://graph.microsoft.com/v1.0/groups/{id}/transitiveMembers
so let's wait and see if we get any feasible solution on this requirement.