401 unauthorised error to fetch sharepoint online search results

siva v 0 Reputation points
2023-03-03T15:19:09.9033333+00:00

I am getting 401 unauthorised error while fetching search results from sharepoint online site. Create apoid, client secret and provided scope as http://sharepoint/search. But still getting 401 error

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 29,751 Reputation points Microsoft External Staff
    2023-03-06T06:11:26.6133333+00:00

    Hi @siva v ,

    We need to narrow down the problem and try some things. Will others report 401 errors?

    1.Double-check whether you’re logged in with a valid user ID and password.

    2.Confirm the URL Is Correct.

    3.Grant user direct explicit (Not through a group but through an individual account) full control permissions.

    4.Clear Browser Cache and Cookies.

    5.Flush DNS Cache: On your desktop, navigate to the search bar and type in “Command Prompt.”->Type in the command “ipconfig/flushdns” and press Enter


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.