1

As a front-end developer I have only used Microsoft Napa to built Apps, have never used Visual Studio.

I now have a requirement to write REST data back into SharePoint Online List from a public website. Using RESTangular I have done this plenty of times in a MySQL stack.

I have read

But these all explain building an App.

Before I start the trial/error proces I would like to get clear:

  • Can a Public Website write data to a SharePoint Online list?
  • Is Visual Studio (.Net code) required to built such a solution?

RE: Comments about _api/contextinfo

contextinfo has to do with accessing a HostWeb from an AppWeb.
As Access SharePoint 2013 data from add-ins using the cross-domain library perfectly explains.
And I have used this in multiple Add-ins I developed

I now want to go Cross-Domain,
In my case from a Browser Plugin activated on a LinkedIN page to a SharePoint List

This ofcourse results in 403 (Forbidden) errors.. Or should I say ofCORS

On my LAMP (Linux-Apache-MySQL-PHP) stack no problem, I can just add:

header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: OPTIONS, GET, POST, DELETE, PUT');

The ADAL - Azure AD Authentication Library for .NET library tackles that problem, AZURE is used as the middle-tier. But all the examples/documentation list Visual Studio as requirement.

So my question is:

  • Do I really need Visual Studio? Or can something else be used?
    (and yes I understand the AZURE as middle-tier is required)

My question (rephrased) is:

I am a stupid (Angular) Front-End developer (with 20+ years LAMP stack experience) and never wanted to touch Visual Studio, I hated all the SharePoint Admin/(Backend)Development stuff... never believed it had a future.
(barely escaped once when I asked "Will you make SP2007 available in the Cloud?")
I am comfortable with Napa (but sure would like better integration in my Grunt/NPM/Bower process) and am comfortable with PowerShell as well.

  • Do I need to hire .Net experience to get this working or can I just do the AZURE configuration without ever touching Visual Studio?

And if someone wants to do a Skype for Business session and configure this for me..
Mail me a price quote.

And I do not want Zappier, I am paying Microsoft plenty of $$$ a year for a place to store my Data and I just want copy some LinkedIN data there.

  • I think it should be possible without VS. Aren't you able to write to list even by using a simple POST request in REST api? Make sure the X-RequestDigest header is valid. I'm able to POST to SharePoint just by using the Advanced Rest client extension in chrome. – Akhoy Aug 10 '15 at 12:04
  • Sure, I do REST POSTs all the time from Chrome Snippets...(for as long the page does not time-out) But from "The Outside" there is no correct X-RequestDigest value. – Danny '365CSI' Engelman Aug 10 '15 at 14:47
  • Not true. POSTing to /_api/contextinfo returns a valid X-RequestDigest value which you can then use. – Akhoy Aug 10 '15 at 14:50
1

Pretty much anything can write data to a SharePoint list.

There are a couple of ways to do this, mainly using either SharePoint web services or one of the Client Side Object Models, such as the CSOM for .Net or the JSOM for JavaScript. The client side object models are mostly just wrappers for the web services to make them easier to use.

The main difficulty I think you will face is authentication. Whatever route you take, either web service or CSOM, you will need to find some way to authenticate to SharePoint Online. This is easier with server side .Net, there's a number of ways you can securely store credentials on the server that your .Net code can then read.

It's obviously harder if you are using client side JavaScript calls, and most use cases for this expect your user to already be logged in to SharePoint.

  • No, even when I am logged in I get a CORS error. Reading from a Tenant is no problem, I have multiple Bookmarklets which read JS files from my O365 tenant. – Danny '365CSI' Engelman Aug 10 '15 at 11:01

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.