title: How to apply an equality filter to a Users request?
body: <p>I'm trying to make a call to the MS Graph Users API using C# and the <code>GraphServiceClient</code>. I'm trying to filter by <code>Mail</code> but no matter what format I try, it gets rejected due to an invalid query. I've tried all the examples I've found on the interwebs but I can't seem to find one that uses the service client to filter users by equality.</p>
  <p>I've tried the following in <code>Filter</code>.</p>
  <p><code>$&quot;eq('Mail', '{email}')&quot;</code>,
  <code>$&quot;equal('Mail', '{email}')&quot;</code>,
  <code>$&quot;equals('Mail', '{email}')&quot;</code>,
  and <code>$&quot;'Mail' eq '{email}'&quot;</code></p>
  <pre><code>await _graphClient
      .Users
      .Request()
      .Filter(filter)
      .GetAsync();
  </code></pre>
  <p>I did <a href="https://iqunlock.com/microsoft-graph-api-c-sharp/#microsoft-graph-explorer" rel="nofollow noreferrer">find a way to filter users</a> where my tenant is the issuer but I need to be able to also search for invited users as well.</p>
  <p><code>var filter = $&quot;Identities/any(id:id/Issuer eq '{TenantName}' and id/IssuerAssignedId eq '{emailAddress}')&quot;;</code></p>
  <p>Removing the equality check on the <code>TenantName</code> makes it an invalid filter.</p>
  <p><strong>What am I doing wrong here; is it possible?</strong></p>