SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a query regarding SharePoint Office 365.

  1. I have a form of any technology like php,, python
  2. Three fields are there Name, Lastname and display name and submit button.
  3. I have office online 365 account in which I have created site and created one custom list with same fields Name,lastname and dsiplay name.

What I want is that when a user fills the form and click on submit button, data should be entered in custom list.

Input can be from any technology like php,

How can I accomplish this in Office 365?

share|improve this question

you can do with the client context object in your .net application by adding reference of Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime;

i have done with console application by following code

string login = "office 365 username";
        string password = "office 365 password";
        var securePassword = new SecureString();
        foreach (char c in password)
        //Authenticate to office 365
        var onlineCredentials = new SharePointOnlineCredentials(login, securePassword);

        using (ClientContext clientContext = new ClientContext("office 365 url"))
            clientContext.Credentials = onlineCredentials;
            Web web = clientContext.Web;

            // You can do operation with client context object


Plz refer this link for insert, update, delete with client context object

Hope it helps...

share|improve this answer
thanks for your response. I am trying this. – Richa Jain May 15 '14 at 11:55
Please help with webservice, list.asmx because input can be from any technology also not decided machine should have sharepoint – Richa Jain May 15 '14 at 13:15

You can update list on sharepoint online using Client side object model.

using(ClientContext clientContext = new ClientContext(siteUrl))
 clientContext.Credentials = new SharePointOnlineCredentials(userName,password);
                SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements");
                ListItem oListItem = oList.Items.GetById(3);

                oListItem["Title"] = "My Updated Title.";


share|improve this answer
Yes, I am updating the answer with some code sample. Thanks for your help. – Aanchal May 15 '14 at 11:23
Please give me some useful links or code. It would be more helpful. – Richa Jain May 15 '14 at 11:24
Are you sure this code will run in form, I mean client context. – Richa Jain May 15 '14 at 11:35
Yes, it will. This is client object model. This will run from all machines from where sharepoint is accessible. – Aanchal May 15 '14 at 12:14
Please help with webservice, list.asmx becuase input can be from any technology also not decided machine should have sharepoint – Richa Jain May 15 '14 at 13:14

Here is an alternative to user2861804's answer, using JSOM instead of CSOM:

function createListItem(siteUrl) {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Announcements');

    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');

        Function.createDelegate(this, this.onQuerySucceeded), 
        Function.createDelegate(this, this.onQueryFailed)

function onQuerySucceeded() {
    alert('Item created: ' + oListItem.get_id());

function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + 
        '\n' + args.get_stackTrace());

getByTitle() uses the display name, not the internal name, and vice versa for set_item().

share|improve this answer
Please help with webservice, list.asmx becuase input can be from any technology also not decided machine should have sharepoint – Richa Jain May 15 '14 at 13:14
Just to clarify, the aspx file is not in SharePoint, but rather hosted elsewhere, which may or may not reside on the SharePoint server? – wjervis May 15 '14 at 13:23
yes you are right, but above code will ask for sharepoint reference and not necessary it would be form it can be of php form too, python form too – Richa Jain May 15 '14 at 13:26
Well, C# would be the approach to go with an form. See answers from user2861804 and Hitesh for more information. You'll have to include the Microsoft.SharePoint.Client.dll files in your solution. As for PHP, I've no experience with PHP, so I'm of no use to you. As for the list.asmx, I have insufficient experience to be of real help. Here's a link that may be of help:…. – wjervis May 15 '14 at 14:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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