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:
- The URL or resource ID is incorrect. For details, see the Search API documentation.
- Permission issues, please check whether you have granted the application the necessary permissions for the resources you access.
- If no License is available, check whether your logged in user has the MS 365 License in Azure AD.
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.