I'm looking for a way to have my application read and write from an Excel workbook without being logged in. when I try to generate my own access token using the /ouath2/v2.0/token endpoint and use it to write data to the Excel workbook, it returns an error. The error is "method is not allowed". In my application i have given permission to:
Application.ReadWrite.All, Directory.ReadWrite.All and Files.ReadWrite.All. Im following this guide here: https://learn.microsoft.com/en-us/graph/auth-v2-service?tabs=http. Im also able to read info via the API about users and data in my excel workbook from within the organisation but im not able to use this request:
https://graph.microsoft.com/v1.0/users/{userid}/drive/items/{ExcelItemID}/workbook/worksheets('Ark1')/range(address='A1')"
this is with the request im getting the method not allowed.