1

I'm trying to get some list elements, using javascript code, from a Sharepoint online instance to the internal, on premises, Sharepoint instance. I've been looking for the past days at Sharepoint's REST API, as well as to JSOM, without success. Could you, please, give me a hint on where should I look?

I know there's already a similar question, here, but I'd just like to hear another answer. Also, if it's impossible with Javascript, could you tell me what should I try? I'd like to stay away from the 3rd party tools, for now.

Thanks

3
  • Use CSOM in console application and get list data from SharePoint online & on premises.
    – kumar
    Commented Nov 6, 2017 at 12:00
  • Hi eOf, Did you manage to find a solution?! I’m also looking. Commented Nov 6, 2019 at 14:22
  • Hi, no, nothing out-of-the-box, I just ended up using CSOM to get the items from a 365 SP list and then create items, with the same values, in the on-premise list.
    – eOf
    Commented Nov 11, 2019 at 13:35

1 Answer 1

0

Well the recommended method for getting data from a list on SharePoint online to onpremise or anywhere else is to use OData and rest services for cross-domain. The key with the rest services is to send your auth with the call. The key to this is the requestdigest that your getting/sending in your rest call.

You have to make a separate HTTP request to retrieve the form digest value.

this is shown here:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints

second method you could use is BCS as sharepoint online supports it too but you need to understand the limitations of using this method!

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/business-connectivity-services-in-sharepoint

0

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.