Error: 401 - FileOpenUserUnauthorized - Graph API

Baris 0 Reputation points
2024-05-27T09:45:11.61+00:00

When I make a request to this endpoint in the doc then ı get the following error and ı am sure, ı have the necessary "permissions" for the request.

Error and Message:

  • Error: 401 - FileOpenUserUnauthorized
  • Message: You do not have permissions to open this file in the browser.

I did some research and the same problem is mentioned in forums here:

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

4 answers

Sort by: Most helpful
  1. DasDune Thailand 5 Reputation points
    2024-05-28T02:19:24.7666667+00:00

    Same for me, my app runs without problem for years, and this morning got this error. My query is : https://graph.microsoft.com/v1.0/me/drive/items/E97916D0B5077B6C!4981/workbook/worksheets('Documents')/usedRange.

    Not working in MS Graoh Explorer either.

    I guess the problem is on Microsoft side. Any clues ?

    1 person found this answer helpful.

  2. Abhishek 10 Reputation points
    2024-06-05T02:26:46.77+00:00

    I am running into this for personal OneDrive accounts. I consented Files.ReadWrite but still running into the same issue.

    "https://graph.microsoft.com/v1.0/me/drive/items/<id>/" works to get Excel workbook but "https://graph.microsoft.com/v1.0/me/drive/items/<id>/workbook/worksheets" show following error.

    Any help here would be appreciated. Screenshot 2024-06-04 at 5.08.34 PM

    1 person found this answer helpful.
    0 comments No comments

  3. François Gélinas 0 Reputation points
    2024-06-07T00:23:24.8366667+00:00

    Did you find a solution? My app also was running fine and than get this error.


  4. Tran Trong Nghia 0 Reputation points
    2024-09-30T10:06:54.68+00:00

    I had the same problem. I solved it by accessing One Drive, then opening the Excel file in the browser. Then I called the /workbook/worksheets API and it worked. I also had the problem of the /search api returning an empty list. And I tried searching for a file by keyword on the One Drive web (remember to press Enter to display the results). And this api also worked again.

    0 comments No comments

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.