I'm using adal-node to retrieve a Azure AD App-Only Token.

This requires that I have a Azure AD Application, modified the manifest to include keyCredentials, generated on my computer with a certificate.

The authenticate works (because if I change one variable, I get a true auth error), and i get the token.

However, when I use the token, i get the systematic answer:

"{\"error_description\":\"The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.\"}"

I actually am using an Azure function, but the error remains the same whenever i try to use the access token i retrieved this way.

Has someone encountered this issue, and overcome it ?

Source for my current project: http://johnliu.net/blog/2016/5/azure-functions-js-and-app-only-updates-to-sharepoint-online

Thank you for your time :)

2 Answers 2


So... Apparently it was about app only permissions in the Azure AD parameters + the admin consent.

Seems to work fine once you have done both.

  • I was going to say you that, seems that admin consent and permissions weren't correct
    – Mikel
    Jul 27, 2018 at 12:18
  • Hey future me, next time you get this error, the solution is this. click the "admin consent" button. Jun 29, 2020 at 15:20

Quick follow on to this make sure you set correct permissions.

Use the SharePoint ones and not the Microsoft.Graph ones.

  • Does Works: SharePoint / Application / Sites.Manage.All
  • Doesn't work: Microsoft Graph / Application / Sites.Manage.All

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.