0

I have a React app that successfully logs into the Azure AD. After logging in, I would like to pass the token to an Azure Function to query the Graph API. However, the token is not valid in the Azure Function. What do I need to do to pass a token?

Permissions on the required resources are set.

With the following code I get my token from the logged in user:

instance
  .acquireTokenSilent(request)
  .then((tokenResponse) => {
    // Do something with the tokenResponse
    console.log(`Token: ${tokenResponse.accessToken}`);
})

If I then request the Graph API with this token via the Azure Function, I get a 401

alexohneander
  • 519
  • 3
  • 7
  • 22

0 Answers0