Cannot use the $select when querying ToDo tasks (error or/and ignored)

JS_T 5 Reputation points
2023-10-14T14:00:06.9866667+00:00

When making simple calls like this

GET me/todo/lists/'<key>'/tasks

We're getting as expected the tasks. BUT when we want to follow best practices, we cannot use the $select like we typically should. If I provide it, it will either be ignored or failed depending on which fields I'm using. So if I ironically follow the @microsoft.graph.tips returned from a response without a $select where it tells me to use this:

GET me/todo/lists('<key>')/tasks?$select=body,bodyLastModifiedDateTime

It will simply fail fail and return me an error like

"error": {
        "code": "invalidRequest",
        "message": "Invalid request",
        "innerError": {
            "code": "RequestBroker--ParseUri",
            "date": "2023-10-14T13:56:36",
            "request-id": "1d5cbb14-966d-42f7-ae72-734e706eff36",
            "client-request-id": "50820971-5cd7-fa43-55bb-274832502daa"
        }
    }

And if I remove "bodyLastModifiedDateTime" from my query and leave only "body", it will return ALL the fields.

So my question is: Are $select working for only some msgraph APIs or its just that there's an issue with the TODO api?

thank you!

JS

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

1 answer

Sort by: Most helpful
  1. Dan P 0 Reputation points
    2024-10-30T17:25:38.2433333+00:00

    Same issue! At least within Graph Explorer that I'm using to experiment prior to coding.

    A popup selector even shows up when I type $select= into the URL, and I choose a simple property like "title", and then it fails with invalidRequest. Some of them partially work, however, such as the "body" one. I say partially because it returns a response, but includes ALL the properties, not just the one I $select'ed.

    In addition to the $select, the $filter seems to have issues too, as I was issuing what appears to be a simple request for $filter=isOwner+eq+false but that also gets invalidRequest for unclear reasons.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.