Search code examples
cordovasharepoint-2013office365apiapache-cordova

How to create a SharePoint List Item from an Apache Cordova application


I have a requirement to insert an item into a SharePoint list (Sharepoint 2013 online) from a Apache Cordova application.

I was planning to use the Cross-Domain JavaScript Library, but i'm not sure how you can ensure the user is authenticated (as I wish to log the user that sent the item to the list)

I have seen many articles that go from some using OAuth and some using Cross Domain.

I have also seen some articles that say I need a Sharepoint App (Previously Sharepoint Add-Ins) as that can get the token, so I can post to my app, and let the app do the work. But I would then still like the authentication soI know who submitted the form.

Has anyone got a clear guide how to do this? Or can advise whether OAuth or Cross Domain is the better way?


Solution

  • I thought I would answer this as it's taken a while for me to get it to work.

    I have created a post on my site covering it:

    http://www.andrew-berry.co.uk/apache-cordova-create-a-list-item-in-sharepoint-online/