Share via

How can I use the Graph API to search sharepoint contact information?

Dave Nicodemus 1 Reputation point
2021-08-16T23:41:08.077+00:00

For example, if a user has listed the term Cooking in their 'About Me->Interests and Hobbies' I want to be able to find their profile using the term cooking. I have tried :
POST https://graph.microsoft.com/beta/search/query

{
    "requests": [
        {
            "entityTypes": [
                "person"
            ],
            "query": {
                "queryString": "Cooking"
            }
        }
    ]
}

But no results, however when I use the sharepoint search box from the share point web interface, I get the profile I'm looking for.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,136 Reputation points
    2021-08-17T06:15:34.61+00:00

    Hi @Dave Nicodemus ,

    Currently, you cannot use Graph API to achieve this. According to the documentation, when we use graph api to search person, the source is Exchange Online not SharePoint. So you would not get results.

    123804-image.png

    You could submit the feature request here: https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform


Your answer

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