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.

941 questions
0
votes
1 answer

SharePoint CSOM Copy - RoleAssignment

hope you can help me out. I'm working on a powershell script performing serveral modifications on a sharepoint environment. I want to copy the RoleAssignments from on web to an other in the same site collection. Basicly it works when i run my…
Constantin Treiber
  • 420
  • 1
  • 7
  • 18
0
votes
1 answer

Remove users and their MySite using CSOM

I have a scenario in which I have to remove the users from SharePoint after they have left the company. Say, I have 5 users who left the company. So I'll write a CSOM code to read the names from a file and delete their respective MySites. Assuming,…
0
votes
1 answer

How to modify PublishedTask property using CSOM in C#?

In my project I access task fields the following way: projContext.Load(proj, p => p.Tasks.Include(t => t.Id, t => t.Name,t => t.Work)); projContext.ExecuteQuery(); task.Work gives me the current value. My goal is to modify the value…
gmode
  • 3,601
  • 4
  • 31
  • 39
0
votes
2 answers

How to declare byte array dynamically in c# for large files

I am trying to convert a document in a SharePoint document library to byte array in restful WCF service. When I declared the byte array with the maximum size, i am getting the files size as the maximum that I had declared. I need to know how to…
TARUN
  • 241
  • 1
  • 8
  • 27
0
votes
1 answer

Passing password in encrypted for to SharePoint CSOM model

using (ClientContext context = new ClientContext("http://yourserver/")) { context.Credentials = new NetworkCredential("user", "password", "domain"); } I wand to send this password in encrypted form is it possible and how?
0
votes
1 answer

How to add users to groups under Sub site's in sharepoint sitecollection?

I have two sub-sites in my sharepoint site,SampleSite1 and SampleSite2 under Parentsite called MainSite. http://xyz.sharepoint.com/sites/MainSite/ - SiteUrl http://xyz.sharepoint.com/sites/MainSite/SampleSite1 - Subsite1's Url …
kaarthick raman
  • 793
  • 2
  • 13
  • 41
0
votes
1 answer

Create list using .stp template using CSOM

I want to create list using .stp file which is uploaded in to the list template Gallary. --> I am using Console application to create list in online site. --> have an any idea how to add list from stp file at online site. I am not getting custom…
0
votes
1 answer

CSOM Caml Query Not able to find file - SharePoint 2010

I am try to get the following file "GC_SELF_TEST.ppt" document from the following folder When I run my code, it does not return any results. I'm quiet certain the problem is in my CamlQuery (I'm new to CSOM and CamlQuery). I would just like to get…
Rana
  • 1,675
  • 3
  • 25
  • 51
0
votes
1 answer

Not All Site Collections show up in the results - Sharepoint 2013 Search through CSOM

I am working on a C# code that retrieves all site collection paths from a On-Premise Sharepoint 2013 server. I have the following Site Collections on the…
John M
  • 1
  • 2
0
votes
1 answer

SharePoint 2013 - App. Mix CSOM and JSOM?

I need to write an Office365-App. I want to use a provider-hosted MVC-Application for this. As I want to use some kind of "API" on some pages, that returns a JSON that then is used inside JS to display data: Can I just mix CSOM and JSOM? Has this…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
0
votes
1 answer

Error while calling ClientContext.ExecuteQuery() in Sharepoint 2013 CSOM

I am new to sharepoint and trying to learn CSOM. I have written a simple code in a console application using VS 2012 to get list details from a sharepoint 2013 site: static void Main(string[] args) { NetworkCredential…
Indie.Dev
  • 134
  • 1
  • 12
0
votes
1 answer

Is context.executeQueryAsync a transactional operation?

Let's say i update multiple items in a loop and then call executeQueryAsync() on ClientContext class and this call returns error (failed callback is invoked). Can i be sure that not a sinle item was updated of all these i wanted to update? is there…
Martin
  • 404
  • 1
  • 5
  • 15
0
votes
1 answer

Deleting Sharepoint list items from one site to another programmatically

I'm trying to delete items from the myDestinationList if they do not exist in the mySourceList. I'm trying to get this method done in C#. I have it set up this way because the two list are on different servers. Any suggestions? Also would I be able…
Shark Tank
  • 25
  • 5
0
votes
0 answers

Importing list Creator Column from CSV file to Sharepoint list

I am trying to import the Author(from a csv file) to the Author/Created By column in a SharePoint list. Running the code I have, the Created By/Modified column automatically retrieves the server login. I am doing this with CSOM. I tried using…
0
votes
1 answer

Project Server 2013 Webpart with CSOM

I want create a webpart to display information from Project Server 2013. So that I can implement my webpart on a new page on Project Server. My approache is to create a SharePoint 2013 Webpart and use Microsoft.ProjectServer.Client.dll private void…
GermanSniper
  • 249
  • 1
  • 5
  • 19