what does NotFound status mean

Shunfu Mao 20 Reputation points Microsoft Employee
2024-07-31T22:29:29.7533333+00:00

Hello,

We're integrating MS Graph Search API and in some cases (not available to us as they're from logs) we saw graph search api (https://graph.microsoft.com/v1.0/search/query) returns NotFound status code. Based on public doc https://learn.microsoft.com/en-us/graph/errors it says 'resource doesn't exist to user'. We wonder what exactly this means? Could you provide an example? Thanks.

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

Accepted answer
  1. Yakun Huang-MSFT 4,720 Reputation points Microsoft Vendor
    2024-08-01T02:42:52.6066667+00:00

    Hi @Shunfu Mao

    After testing, when using the Search API, even if the query results are not found, it will normally return empty content, 404 is usually when the resource does not exist, that is, when we access a user, the user does not exist, it will report 404.

    However, for Search API, even if the user does not exist, it will return normally.

    Other possible reasons for 404 are:

    1. The URL or resource ID is incorrect. For details, see the Search API documentation.
    2. Permission issues, please check whether you have granted the application the necessary permissions for the resources you access.
    3. If no License is available, check whether your logged in user has the MS 365 License in Azure AD.

    User's image

    Hope this helps.

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


0 additional answers

Sort by: Most helpful

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.