Aaron
Aaron

Reputation: 11

"The expression \"fields(select\" is not valid."

With Graph Explorer, the following call works just fine.

https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,964f1605-0c35-4e79-bc57-cd76f7a2ff7d,4e13a384-18bc-49c0-8f21-1a3f15c4dc63/lists/d136b6b0-69a3-4f58-9ec2-3056e149b86f/items?expand=fields

However, when making the call with select like below, it fails.

https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,964f1605-0c35-4e79-bc57-cd76f7a2ff7d,4e13a384-18bc-49c0-8f21-1a3f15c4dc63/lists/d136b6b0-69a3-4f58-9ec2-3056e149b86f/items?expand=fields(select=id)

It returns:

"error": {
    "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
    "message": "The expression \"fields(select\" is not valid.",
    "innerError": {
        "request-id": "eda74444-8c72-1111-90ea-26797ce181be",
        "date": "2020-03-18T11:11:11"
    }
}

What's wrong with the request?

Upvotes: 1

Views: 1165

Answers (2)

Dan Bennett
Dan Bennett

Reputation: 1450

Try replacing the = with %3D within the nested select. Seems like Graph Explorer doesn't like a naked = in brackets. Receiving 400s and 500s when attempting to get singleValueExtendedProperties

Upvotes: 1

AlfredoRevilla-MSFT
AlfredoRevilla-MSFT

Reputation: 3485

Use $expand=fields($select=id). The $ prefix is mandatory for v1.

Upvotes: 1

Related Questions