Getting started with Camelot SharePoint Connector and Office 365

In the new version (3.0) of the Camelot .NET SharePoint Connector Office 365 SharePoint Online support was introduced among a lot of new features.

Changes in the Connection String

Any previous application written will still be compatible with the Office 365 version of SharePoint. Simply set the authentication parameter to 365.

string connectionString = "server=mysite.sharepoint.com;site=;user=user@mysite.onmicrosoft.com;password=xxx;Authentication=365";

All connection string options: http://www.bendsoft.com/documentation/camelot-net-connector/latest/reference/connection-string-options/

Getting started with a simple test

To demonstrate this I will write a simple program to view all available lists and libraries in the default site, I will use the connection string written earlier in this post. To view all lists use the SHOW TABLES command, full documentation here.

Available columns

The available columns is listed in the documentation, to view this yourself simply write this

// Retrieve all available lists on the site
DataTable siteTables = Helper.ExecuteDataTable("SHOW TABLES", connectionString);

// List columns
foreach (DataColumn column in siteTables.Columns)
{
    Console.WriteLine(column.ColumnName);
}

View the row data

To list all available lists and libraries lets have a look in the Rows DataRowCollection.

// Retrieve all available lists on the site
DataTable siteTables = Helper.ExecuteDataTable("SHOW TABLES", connectionString);

// Headings
Console.WriteLine("{0,-23} {1,-11} {2} ", "Title", "Item Count", "ID");

// Print the data
foreach (DataRow row in siteTables.Rows)
{
    Console.WriteLine("{0,-23} {1,-11} {2} ", row["Title"], row["ItemCount"], row["ID"]);
}

I’ve selected to display the Title, ItemCount and ID properties from the table

Ending

This was just a simple post to get you started using the Camelot .NET Connector and Office 365. Integrations have never been easier and this is compatible with all our other tools like Camelot PHP Tools for SharePoint.

This entry was posted in Camelot .NET Connector, Office 365, Tutorials and tagged , , . Bookmark the permalink.

2 Responses to Getting started with Camelot SharePoint Connector and Office 365

  1. ronald says:

    I have error in office365 connection string I just follow this tutorial
    http://blog.bendsoft.com/2013/01/getting-started-with-camelot-sharepoint-connector-and-office-365/

    Claims Based Authentication Failed

Leave a Reply to Eric Herlitz Cancel reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>