Why is $filter=eq() an invalid filter clause on /users?

Chris X 41 Reputation points
2021-07-14T21:17:36.423+00:00

Does anyone know why this fails?

Request: GET https://graph.microsoft.com/v1.0/users?$filter=eq(employeeId, '1.0.3384')

Response:

{
    "error": {
        "code": "BadRequest",
        "message": "Invalid filter clause",

If I use $filter=startsWith() instead, this works fine, but I have use cases where eq() is desired.

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

Accepted answer
  1. CarlZhao-MSFT 39,101 Reputation points
    2021-07-15T01:28:44.68+00:00

    Your eq filter parameters are used incorrectly. You only need to make a small modification and the problem should be solved.

    https://graph.microsoft.com/v1.0/users?$filter=employeeId eq '1.0.3384'  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful