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:
- I am able to register my App at the AppRegNew.aspx page.
- I Grab the realm of our site from the AppPrincipals.aspx page of our site (the part after the @).
- 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?