Skip to content

MsGraph Todo $filter finishes with "Invalid request" error when has "contains(title, '&')" criteria #2968

@23W

Description

@23W

Describe the bug

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

So application executes request with filtering criteria contains(title, '&'):

graphClient.Me.Todo.Lists[myListId].Tasks.GetAsync(rc => rc.QueryParameters.Filter = filter)

where filter is string "contains(title, '&')".

MsGraph SDK fires exception "invalidRequest" from server's JSON response:

{
    "error": {
        "code": "invalidRequest",
        "message": "Invalid request",
        "innerError": {
            "code": "RequestBroker--ParseUri",
            "date": "2025-08-12T10:04:15",
            "request-id": "4c70fb4e-18c5-4725-859f-4dfc99e9adcd",
            "client-request-id": "97fa3a5b-08ca-46dd-bdfd-784341a5a308"
        }
    }
}

Expected behavior

MsGrpah SDK should return tasks that are filtered according criteria

How to reproduce

use filter "contains(title, '&')"

SDK Version

5.73.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions