Microsoft Graph groups API $filter Contains (contains) and $expand transitiveMembers not working

Vidyadhar Kurmala 1 Reputation point

W.r.t documentation aad-advanced-queries I understand $search and $ expand is not supported.. Based on that I tried to use following options $filter Contains(contains) and $expand which is not working as well.

so I would like to know the workable options to read data from transitiveMembers.

Here are few screenshots that are erroring out.

Tried with both $filter=Contains(displayName,'ariba') with $expand and $filter=contains(displayName,'ariba') with $expand.

$filter and $expand:


$search and $expand


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,126 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,156 Reputation points Microsoft Employee

    Hi ,

    Note :
    The $filter operator requires advanced query parameters, which are:
    ConsistencyLevel=eventual header
    $count=true query string

    Doc -

    Could you please try by using "Startwith" in place of "Contains" , please see the below API
    URL -, 'ariba')&$expand=transitiveMemberOf

    Hope you are expecting the same result.

  2. Vidyadhar Kurmala 1 Reputation point


    Thank you for your reply, however startsWith doesn't fit here.

    displayName doesn't accept contains w.r.t this link


    here is a screenshot with filter contains and count = true.$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:

    1. First call: get all group names that has Ariba keyword using$search="displayName:ariba"
    2. Loop through each record and call the second API{id}/transitiveMembers

    so let's wait and see if we get any feasible solution on this requirement.

    0 comments No comments