Skip to content

MsGraph Todo $filter finishes with "BadRequest" error when has "contains(title, '&')" criteria #3932

@23W

Description

@23W

Describe the bug
My application needs to find all Todo Tasks that have & symbol in title field.

So to test filter criteria i execute request with filtering contains(title, '&'):

GET https://graph.microsoft.com/v1.0/me/todo/lists/{taskListId}/tasks?$filter=contains(title, '&')

MsGraph Explorer returns error:

{
    "error": {
        "code": "BadRequest",
        "message": "Invalid filter clause: There is an unterminated string literal at position 17 in 'contains(title, ''.",
        "innerError": {
            "date": "2025-08-12T10:10:45",
            "request-id": "e695156b-cfbb-4678-a057-5ca74aa7902c",
            "client-request-id": "387e4304-d15f-74f0-759d-abf610489e23"
        }
    }
}

To Reproduce
Steps to reproduce the behavior:

  1. Execute request https://graph.microsoft.com/v1.0/me/todo/lists/{taskListId}/tasks with filter criteria contains(title, '&')
  2. Link should be similar to https://graph.microsoft.com/v1.0/me/todo/lists/{taskListId}/tasks?$filter=contains(title, '&')

Expected behavior
MsGraph Explorer should encode special symbols in request and execute it and return correct result

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions