I am writing a JavaScript Node.js app to access a SharePoint 2013 server. I want to use REST calls to SharePoint. I believe I want to use OAuth authentication, as this "App" (as MS calls it), is living outside of the server where SharePoint is installed.

There are several guides that describe how to setup the OAuth with SharePoint, as follows:






Overall, the procedures are the same. Some of these refer to SharePoint Online, others don't say which version.

Here is what I am doing:

  1. I am able to register my App at the AppRegNew.aspx page.
  2. I Grab the realm of our site from the AppPrincipals.aspx page of our site (the part after the @).
  3. When I go to the OauthAuthorize.aspx page, It will ask "Do You trust ". I click on the "Trust It" button, and then I am sent to the redirect page I specify, however I get get the parameters, "error" = server_error and "error description" = "The Azure Access Control Service is unavailable".

I expect to get a value called "code", which I then call with accounts.accesscontrol.windows.net. Yet, even that seems wrong, as this is NOT SharePoint Online, so I would not expect our installation to us ACS.

What do I need to do to get an access token, which I could pass into my REST call with the header "Authorization: Bearer ".

Maybe I am going about this the wrong way, if so, could you kindly point me in the correct direction?

1 Answer 1


If anyone else comes across this, here is some additional information: https://social.technet.microsoft.com/Forums/office/en-US/0debddda-ace7-48ca-b1da-a2f2a240b967/rest-call-to-sharepoint-2013-from-nodejs-javascript-app?forum=sharepointdevelopment

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.