Поделиться через

Can't query Excel spreadsheets, with the error "Could not obtain a WAC access token."

Анонимные
2024-01-24T12:15:38+00:00

Good afternoon,

I recently encountered a problem where I can't query my Excel spreadsheet, using Microsoft Graph Explorer. I have been using Excel for about half a year and this problem occurred at the end of December 2023.

When I try to send a "Get Worksheet" query or any other query that accesses a specific sheet in a book to my Excel spreadsheet, I get the same error every time for 3 weeks :
{

 "error": {

"code": "AccessDenied","message": "Could not obtain a WAC access token.","innerError": {"date": "date_request","request-id": "requiest_id","client-request-id": "client-request-id"}}}

I also noticed that if I want to make any other query to the table where I don't need to specify a specific sheet in the book, everything works fine.

Is it possible to fix this error or what causes it?

Thank you for any reply.

Microsoft 365 и Office | Excel | Для дома | Другое
Microsoft 365 и Office | Excel | Для дома | Другое

Семейство программного обеспечения Майкрософт для работы с электронными таблицами, оснащенное инструментами для анализа, построения диаграмм и обмена данными.

Заблокированный вопрос. Этот вопрос был перенесен из сообщества службы поддержки Майкрософт. Вы можете проголосовать о его полезности, но не можете добавлять комментарии или ответы, а также подписаться на этот вопрос.

Комментариев: 0 Без комментариев

1 ответ

Сортировать по: Наиболее полезные
  1. Анонимные
    2024-01-24T15:41:24+00:00

    Hello Danyil,

    I'm Ibhadighi and I'd happily help you with your question. In this forum, we are Microsoft consumers just like yourself.

    The error you're encountering with Microsoft Graph Explorer, "Could not obtain a WAC access token," when trying to query specific sheets in an Excel spreadsheet, suggests an issue related to access permissions or token authentication. Here's a simple approach to troubleshoot this problem:

    1. Token and Permissions Check:
      • Ensure that the access token you're using has the correct permissions to access Excel files. You might need to have specific read/write permissions for Excel files.
      • In Graph Explorer, check the permissions you've granted and add any necessary Excel-related permissions like Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All, etc.
    2. Refresh Access Token:
      • Tokens can expire or become invalid. Try signing out and signing back into Graph Explorer to refresh your access token.
    3. Check File Accessibility:
      • Ensure that the Excel file you're querying is stored in a location accessible by Microsoft Graph, like OneDrive or SharePoint.
      • Verify that there aren't any restrictions on the file that could be preventing access.
    4. Try performing the same operation on a different Excel file to see if the issue is specific to the particular file you're querying.

    Please note that issues with API queries can sometimes be complex, involving multiple factors like permissions, file locations, and token validity. Ensuring all these elements are correctly aligned is key to resolving such issues.

    I hope this helps.

    Best Regards, Ibhadighi

    Этот ответ помог вам?

    Комментариев: 0 Без комментариев