Cannot open an Excel file using Microsoft graph API
Listing excel files works, but getting Excel data from selected file it does not. It worked previously but it stopped working a month ago. It works with other personal or business accounts but not with the:
email address removed for privacy reasons
Steps to reproduce:
1. first I list all excel files (files that ends with .xlsx). I know that the extension is not enough to get real Excel files but it suffice in my case.
2. Then i try to open an Excel file by calling this endpoint
as a result i got an error
These two endpoints work with other personal or work accounts. It stopped working only on this account (email address removed for privacy reasons). I also removed all files from one drive, uploaded them again, and checked that they were not corrupted.
Nothing of the above didn’t help.
Listing excel files works, but getting Excel data from selected file it does not. It worked previously but it stopped working a month ago. It works with other personal or business accounts but not with the: email address removed for privacy reasons Steps to reproduce:1. first I list all excel files (files that ends with .xlsx). I know that the extension is not enough to get real Excel files but it suffice in my case. https://graph.microsoft.com/v1.0/me/drive/root/search(q=’.xlsx’)?$orderby=name&$select=id,name,file&$top=500 2. Then i try to open an Excel file by calling this endpointhttps://graph.microsoft.com/v1.0/me/drive/items/1A598D2F196C57FE!sca0d634a6619431f937224df91ca1a4d/workbook/worksheets as a result i got an error{ “error”: { “code”: “FileOpenUserUnauthorized”, “message”: “You do not have permissions to open this file in the browser.”, “innerError”: { “code”: “unauthorizedUncategorized”, “message”: “Required authentication information for the resource is either missing or invalid.”, “innerError”: { “code”: “FileOpenUserUnauthorized”, “message”: “You do not have permissions to open this file in the browser.” }, “date”: “2024-05-29T11:51:53”, “request-id”: “38898f18-9e15-45dc-b0bb-c034e44ca8a3”, “client-request-id”: “413819d8-bf86-2489-56f3-dc73b0ba02d9” } }} This user has a File.Read and File.Read.All permission, that should be enough to read an Excel files. These two endpoints work with other personal or work accounts. It stopped working only on this account (email address removed for privacy reasons). I also removed all files from one drive, uploaded them again, and checked that they were not corrupted. Nothing of the above didn’t help. Read More