James B
James B

Reputation: 23

MS Graph V1.0 : Blank 'select' and 'filter' does not work

How can I pass blank values for select and filter in MS Graph V1.0? I noticed that in beta, blanks work perfectly fine, but in V1.0, it doesn't.

This works (beta):

https://graph.microsoft.com/beta/sites/mysite.sharepoint.com,2d0e7d3e-41e8-40dd-9ace-608aaaab0f16,d7ab7554-bexx-4352-be04-fab2fae9f2a8/lists/944768fd-45f4-4fc5-af39-d8f561f02f1b/items?expand=fields(select=)&filter=

This one doesn't (V1.0):

https://graph.microsoft.com/V1.0/sites/mysite.sharepoint.com,2d0e7d3e-41e8-40dd-9ace-608eaaaab0f16,d7ab7554-bexx-4352-be04-fab2fae9f2a8/lists/944768fd-45f4-4fc5-af39-d8f561f02f1b/items?expand=fields(select=)&filter=

Upvotes: 2

Views: 303

Answers (1)

Karlheinz Reinhardt
Karlheinz Reinhardt

Reputation: 1075

In the V1.0 endpoint you have to include the $-prefix before each query parameter.
Only in the beta endpoint this is optional:

Note: On the beta endpoint, the $ prefix is optional. For example, instead of $filter, you can use filter. For more details and examples, see Supporting query parameters without $ prefixes in Microsoft Graph.

from Graph documentation

So your request should look like this

/V1.0/sites/mysite.sharepoint.com,2d0e7d3e-41e8-40dd-9ace-608eaaaab0f16,d7ab7554-bexx-4352-be04-fab2fae9f2a8/lists/944768fd-45f4-4fc5-af39-d8f561f02f1b/items?$expand=fields($select=)&$filter=

Upvotes: 1

Related Questions