Please tell me about the query format in Microsoft Graph

2022-08-03T09:01:49.17+00:00

I want to search Sharepoint with GraphExplore, but what kind of query should I write if I want to get a list of 544002, for example, the contents of a column like the attached image?

How can I search by changing the contoso part in the GraphExplore below227662-sharepoint.png

https://graph.microsoft.com/v1.0/sites?search=contoso

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,007 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shivam Dhiman 6,056 Reputation points
    2022-08-03T12:02:02.283+00:00

    Hi @旭工精株式会社データバンク

    To get the contents of a column you can use this Graph API GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?$expand=fields&$filter=fields/{field-Name} eq '{value}'

    Please refer below sample screenshot from Graph Explorer.
    227636-sp2.png

    If you want to get all values of particular column you can use GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?expand=fields(select=Column1)

    For more details please refer to this documentation.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote. If you have further questions about this answer, please click "Comment".

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. 2022-08-07T09:10:32.713+00:00

    Thank you very much.
    Solved my problem a little.
    I can't serch fields by keyword. it huppened error.
    Maybe it's because the keywords are in Japanese?
    Please tell me the character code that can be used for keywords.
    For example, UTF8

    The highlight part of the attached image is written as the mold name as the field name in Japanese.
    I don't understand the displayed character code.

    Best regards

    228787-example.png


  2. 2022-08-09T10:29:56.627+00:00

    Thank you very much.
    Please tell me more.

    https://graph.microsoft.com/v1.0/sites/akjoffice2.sharepoint.com,2a44ca52-f04e-45e5-98ff-d920059c6345,5dc19a59-4399-47c0-a3a9-8748594c716c/lists/734ca717-0580-474a-b474-cb84fd62177c/items?$expand=fields&$filter=fields/\_x91d1\_\_x578b\_\_x756a\_\_x53f7\_ eq '52460002'

    I solved it by writing this way.
    However, I had to add Key: Prefer ,Value:HonorNonIndexedQueriesWarningMayFailRandomly to the header.

    I have two questions.

    First, I would like to perform an AND search with two keywords. In that case, how should I describe it?
    As a test, I wrote the following, but this is an OR search.

    https://graph.microsoft.com/v1.0/sites/akjoffice2.sharepoint.com,2a44ca52-f04e-45e5-98ff-d920059c6345,5dc19a59-4399-47c0-a3a9-8748594c716c/lists/734ca717-0580-474a-b474-cb84fd62177c/items?$expand=fields&$filter=fields/\_x91d1\_\_x578b\_\_x756a\_\_x53f7\_ eq '52460002'&$filter=fields/_x91d1__x578b__x4fee__x6b63__x5bfe__x5fdc__x6e08_ eq 'false'

    Second, as in the attached image, when I try to convert it to C# code, the process does not complete.
    Adding a header doesn't work?

    Ultimately, I'm thinking of using the GRAPH API from C# code.

    Best regards.229499-2022-08-09-191659.png


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.