Graph API - Sharepoint - POSTMAN - Could not obtain a WAC access token

Gopi, Radhika 61 Reputation points
2021-04-06T23:13:39.54+00:00

when trying to access Sharepoint workbook receiving the error "403 forbidden Could not obtain a WAC access token". However able to get the items in the sharepoint site.

Azure AD permissions:
"roles": [
"Sites.Read.All",
"User.Read.All",
"Files.Read.All"
],

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,508 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,560 questions
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-04-08T02:11:59.713+00:00

    Hi @Gopi, Radhika

    I could replicate the issue if the exvel file is .xls extension. So I think your excel file is .xls file.

    However, the Excel REST API supports only Office Open XML file formatted workbooks. The .xls extension workbooks are not supported.

    Please refer to this article for more: https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0


2 additional answers

Sort by: Most helpful
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-04-07T02:27:15.063+00:00

    Hi @Gopi, Radhika

    Per my test, I could aceess the workbook in SharePoint successfully.

    85034-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    1 person found this answer helpful.

  2. Gopi, Radhika 61 Reputation points
    2021-04-07T16:13:24.393+00:00

    I have set the following permissions in Azure AD.

    85417-microsoftteams-image.jpeg

    But getting "Could not obtain a WAC access token" in POSTMAN and 403 forbidden in Graph explorer UI.

    URL Endpoint:https://graph.microsoft.com/v1.0/sites/<site>.sharepoint.com,<id>/lists/<itemid>/items/1/driveitem/workbook/worksheets

    Error in Graph explorer:
    85357-screenshot-2021-04-07-111220.png

    0 comments No comments