microsoftgraph / msgraph-sample-reactspa

This sample demonstrates how to use the Microsoft Graph JavaScript SDK to access data in Office 365 from React browser apps.
MIT License
125 stars 105 forks source link

403 Error - Access token is empty #54

Closed andatt closed 4 years ago

andatt commented 4 years ago

I am just trying to run the code with no changes from tutorial but keep getting this error when user authenticates:

{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token is empty.",
    "innerError": {
      "date": "2020-09-11T11:21:34",
      "request-id": "4f00c76f-d4dc-465e-889a-d81dfa04969f",
      "client-request-id": "4f00c76f-d4dc-465e-889a-d81dfa04969f"
    }
  }
}

When I log the code output I can see there is in fact an access token which is passed into getAuthenticatedClientas expected. Any idea what's going on?

Thanks

jasonjoh commented 4 years ago

No, I'm sorry. You can see the Graph request if you use developer tools in your browser and go to the Network tab. From there you should be able to find what value is going in the Authorization header.

ghost commented 4 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.