0

I have a requirement to read list data from SharePoint Online and display on an external html page.

Most of articles points towards REST API calls But how I can make an authenticated REST API call from an external HTML page?

Please, anyone can help me in this.

0

Check the solution below:

SharePoint Online Authentication via JavaScript

Or try to use Active Directory Authentication Library (ADAL) for JavaScript to achieve it.

  • Thanks. I tried with first option and getting error on browser - "XMLHttpRequest: Network Error 0x80700013, Could not complete the operation due to error 80700013" and "Access to XMLHttpRequest at 'login.microsoftonline.com/extSTS.srf' from origin 'localhost:55955' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." – Binoy R Oct 23 '19 at 0:17
  • Do I have to add anything specific to my calling HTML page ? – Binoy R Oct 23 '19 at 0:17
  • As a workaround, we can also create a custom web api or REST API with CSOM C# code to get list data in the local domain server, then consume the API in the local HTML page. – LZ_MSFT Oct 23 '19 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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