Graph API - Workbooks - Create Session - Could not obtain a WAC access token

Lucas Klassmann 25 Reputation points
2023-03-21T13:03:54.8266667+00:00

Hi,

We have an internal client to Graph API in Python to work with Worksheets. It starts refreshing tokens if needed and calling the createSession endpoint. It was created years ago and was working fine until recently. We started receiving the following error:

{"error":{"code":"AccessDenied","message":"Could not obtain a WAC access token."}}

The client works with OneDrive and Sharepoint accounts, just for OneDrive it stopped working. We usually call this endpoint:

POST me/drives/{driveId}/items/{id}/workbook/createSession

But we also tried to call:

POST me/drive/items/{id}/workbook/createSession

Another detail is that we are working with .XLSX files.

It was working fine, I checked if the code was changed, but no changes were made. I also tried to test using the Graph API Explorer and it did not work.

https://learn.microsoft.com/en-us/graph/api/workbook-createsession?view=graph-rest-1.0&tabs=http

Could someone guide me to solve this issue?

Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,672 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhanu Kiran 3,526 Reputation points
    2023-03-21T16:21:18.5366667+00:00

    Hello @Lucas Klassmann ,

    I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    I would also recommend you to refer to this similar posts: https://learn.microsoft.com/en-us/answers/questions/1190965/could-not-obtain-a-wac-access-token

    https://learn.microsoft.com/en-us/answers/questions/1190202/microsoft-graph-files-api-not-downloading-the-late

    Hope this helps.

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


0 additional answers

Sort by: Most helpful