Questions tagged [csom]

CSOM (Client Side Object Model) is a web services-based API of SharePoint allowing easy remote access to data and SharePoint's functions.

CSOM, which stands for Client-Side Object Model, is a web services-based API of SharePoint. It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.

Both JavaScript and .NET bindings to CSOM exist. Software leveraging CSOM can integrate with SharePoint without the need to run within a SharePoint farm.

In SharePoint 2013 CSOM is the only API available to software built using the new Apps for SharePoint architecture. Apps for SharePoint run side-by-side, typically in the cloud, and integrate with both cloud and on-premise SharePoint farms.

Corresponding MSDN documentation is located here, with separate JavaScript and .NET API references. The web services-based API underlying CSOM has been documented as part of Microsoft's Open Specifications initiative.

870 questions
4
votes
2 answers

Fatest way to check and create folder in document library within SharePoint Online (CSOM)?

I have a SharePoint Online where I can connect through my console application successfully: private static ClientContext GetUserContext() { var o365SecurePassword = new SecureString(); foreach (char c in o365Password) { …
STORM
  • 3,441
  • 5
  • 42
  • 85
4
votes
2 answers

Create field in SharePoint programmatically using CSOM (Not with XML)

Is it possible to create fields in SharePoint with CSOM, not using XML? I've seen many examples using XML, but none with just setting properties for the field programmatically? fields.Add(new **FieldCreationInformation** { InternalName =…
Robin
  • 690
  • 1
  • 10
  • 25
4
votes
1 answer

SharePoint 2013: How to update multi-value lookup field using JavaScript CSOM

I have a Contacts list which has a multi-value lookup field called ContactType. The result of a CAML query will show the following value for ContactType for one of the list items: 1;#Applicant;#2;#Employee I had a look at Fiddler after executing a…
user1309226
  • 659
  • 1
  • 8
  • 29
4
votes
2 answers

SharePoint/GetVersionCollection - how to identity which version?

I need to be able to query old field values from items in a SharePoint list. I can't execute code on the server (it needs to work with SharePoint Online/O365 for a start). So far the ONLY API I've that lets me do this is the lists.asmx…
Dylan Nicholson
  • 1,115
  • 11
  • 20
4
votes
1 answer

Get all the users based on a specific permission using CSOM in SharePoint 2013

I want to get the list of all the users who have a particular role/permission on a site. For example, I need the list of users who have edit rights (RoleType=Editor) using .Net CSOM in SharePoint 2013. They can be in any group. I tried many things.…
4
votes
1 answer

How to add a Web Part into a SitePages/Home.aspx using CSOM

has anyone managed to add a Web Part into a Wiki page using CSOM? Background: Home.aspx is a Wiki page and all its WPs are located in the rich text zone (in fact a "WikiField" column). Technically they are located in a hidden "wpz" web part zone and…
Jan Lenoch
  • 69
  • 2
  • 7
4
votes
1 answer

No 'Access-Control-Allow-Origin' header

I have an MVC application deployed to Azure which was created as a SharePoint App Part (Provider-Hosted) for a SharePoint Online site. All Client ID and Secret ID are set correctly within SharePoint site and the Azure web Application. The App does…
user1333524
  • 453
  • 5
  • 17
4
votes
1 answer

Sharepoint Online / Excel Services / Delegated authentification

We have an asp.net MVC application where users connect through azure active directory. They can manage files through their sharepoint online accounts. To access sharepoint online, we use CSOM.We want the user connected to azure active directory use…
4
votes
1 answer

Installing Sharepoint App with CSOM

Does anyone know if it is possible to automatically install particular App on sharepoint site using CSOM? We have mechanism that creates new site on sharepoint, and what we need is to automate process of installing particular Sharepoint App on each…
Konrad Z.
  • 1,472
  • 4
  • 18
  • 33
4
votes
1 answer

Change permissions of a SharePoint list using JavaScript

I have an app that creates a list. I'd like the app to also set the list permissions to only allow admins to make changes to the list. I know how to hide the list, but I understand that this will not prevent clever users from typing in the URL of…
Ectropy
  • 1,433
  • 3
  • 18
  • 37
4
votes
2 answers

SharePoint CSOM, retrieving site collections. Limited to 300?

I am trying to retrieve the site collections list from a SharePoint Online domain. I am using C# and client object model. The following code returns only 300 site collections. var tenant = new Tenant(ctx); spp = tenant.GetSiteProperties(0,…
Sylvain Gantois
  • 632
  • 8
  • 26
4
votes
1 answer

Sharepoint field has not been initialized in C#

I'm writing a code that will go through every list item in a sharepoint list and look for an empty field. If an empty field is found, the person responsible for the list item is notified by email. I'm getting an error at the line val =…
user3158291
  • 55
  • 1
  • 1
  • 4
4
votes
1 answer

Where is a SiteLogoUrl in CSOM?

I found SPWeb.SiteLogoUrl and expected this property in CSOM and REST. But I didn't find it. How can I get a SiteLogoUrl using CSOM or REST? SP.js Microsoft.SharePoint.Client.dll
Warlock
  • 6,861
  • 8
  • 46
  • 73
4
votes
1 answer

Sharepoint 2013: Inserting image on page javascript csom

I create a new page with javascript csom. I am able to give it a title, byline, content etc., but it won't accept an image reference. It doesn't give me any error messages, nor reaching my error function, but I'm obviously missing something here as…
4
votes
2 answers

How to retrieve sites of a specific type using CSOM?

I'm making an application which connects to SharePoint 2013. I'm using CSOM to work with SharePoint. I want to display the newsfeed of site (Team Site) which the current user follows. To get the newsfeed, I implement the following step: First, I…
1 2
3
57 58