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.

1 Answer 1

0

Check the solution below:

SharePoint Online Authentication via JavaScript

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

3
  • 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
    Commented Oct 23, 2019 at 0:17
  • Do I have to add anything specific to my calling HTML page ?
    – Binoy R
    Commented Oct 23, 2019 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
    Commented Oct 23, 2019 at 1:11

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.