The client-side object model (CSOM) provides access to a subset of the SharePoint Foundation server object model, including core objects such as site collections, sites, lists, and list items and allows you to program against these from client side applications.

learn more… | top users | synonyms

7
votes
1answer
205 views

Code editor (IDE) for CSOM developement - Sharepoint

I am searching for a code editor with which I can connect to SharePoint library, like I can open a complete library in the editor, edit, save changes, which will be reflected in the library. ...
4
votes
1answer
87 views

executeQueryAsync callback with a while loop

I am fairly new to javascript and have spent some time trying to understand callbacks as they relate to SharePoint's CSOM, but have had some issues. Essentially, I am running a query to get a ...
4
votes
1answer
73 views

Move web to recycle bin using CSOM

I have the code below, that deletes all websites below a specific web. It works fine, but deletes the webs permanently. I want it to move the webs to the recycle bin instead. What do I have to change ...
4
votes
2answers
62 views

SharePoint 2013 - Unique permissions for claims

This is about SharePoint 2013 On-Premise environment. We've a scenario in which certain content is authored in source site collection and published to a target site collection via cross-site ...
3
votes
4answers
76 views

Compatiblity when using CSOM or SOM

If I want to develop an application in .Net using C# which will perform simple operations such as: Connect to a site using user/password Retrieve document libraries Upload file in document ...
3
votes
1answer
47 views

list all users in an office 365 site powershell csom

How can I list all the users from an office 365 account. I have tried this: $users = $Context.web.SiteUsers; $userinfos = $Context.web.SiteUserInfoList; ...
3
votes
1answer
32 views

'Microsoft.Web' is a 'namespace' but is used like a 'type' in CSOM sharepoint

I am new to CSOM and below is my first console application. the web is not recognising. Though all the dll in 15 hive are verified. Please help using System; using Microsoft.SharePoint; using ...
3
votes
1answer
76 views

Uploading a large file to Office 365 via CSOM PowerShell

I have the following code : $FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open) $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation ...
2
votes
1answer
60 views

How a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?

While RunWithElevatedPrivileges is applicable in Server side code how a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?
2
votes
1answer
117 views

How To Create a Picture Library in SharePoint Online(office 365) Using CSOM-JavaScript?

Currently I have created SharePoint Hosted App (Picture Slider) using Napa Office 365 Development tool. So far, I have created picture Library Manually, and now trying to create Picture Library using ...
2
votes
1answer
54 views

CSOM Search API does not return all the results

I am having a problem with the code below. It is not returning all the rows/items which are found in different lists. The total number of items is 28, but the code below is returning 19. I have set ...
2
votes
1answer
51 views

Prevent Workflow Status Column From Being Added To Default View (CSOM)

I'm using CSOM, when I publish workflow I have got additional workflow column in my default view. I found similar question, but answer is not suits for CSOM. Can anyone advise what need to do to to ...
2
votes
1answer
28 views

Using PowerShell with CSOM to grant permissions to AD security groups

I have been testing out the provisioning of team sites using Powershell CSOM calls working against an on premise SharePoint 2013 farm. Creating Team Sites this way is very easy. One of the great ...
2
votes
1answer
40 views

Missing properties of _spPageContextInfo after page load

I have a script that provision site collections under a specific managed path. In these site collections, I have sub webs with page libraries in which I have several different pages with custom ...
2
votes
2answers
2k views

Send Email from CSOM

Is it possible to send an Email from an Autohosted Sharepoint 2013 app from CSOM code (C#) with an attachment? I have the following code: EmailProperties properties = new EmailProperties(); ...
2
votes
1answer
18 views

Enable Labels (via Retention policy) in List: How?

In my SharePoint App, I want to provisioning a document library and set the following list setting: Information management policy settings > Set source of retention to "Library and folders" ...
2
votes
1answer
58 views

Is it possible to get “Active Directory” groups and members using client object model in sharepoint2013?

Is it possible to get "Active Directory" groups and members using client object model in sharepoint2013? If any one know please share your ideas. :)
2
votes
0answers
36 views

How do I get a list of followers for a content?

I need to know who is following a site a document or a tag. found how to get followers for the current user but not for a content.
2
votes
0answers
184 views

CSOM site provisioning error: The request uses too many resources

I continue to get an error (sometimes) when provisioning a web using CSOM. According to this MSDN article, this error is returned when the CSOM request exceeds 2MB. I watched the call in Fiddler and ...
1
vote
1answer
68 views

CSOM CamlQuery is returning data I don't believe it should

I have the following code to retrieve orders from an order list that have a status of Approved: private static ListItemCollection LoadListItemCollection() { using (var ctx = new ...
1
vote
2answers
84 views

How to attach files to list item using Client Object Model?

I have a SharePoint List to which I am adding new ListItems using the Client Object Model. Adding ListItems is not a problem and works great. How to add Attachments?
1
vote
2answers
145 views

Adding Read-Only-permissions to a list for a Sharepoint Group using Powershell CSOM

I am trying to add read-only-permissions to a specific group called "Students" for a list I have created called "Quiz". I have to use PowerShell CSOM, and in every other tutorial I've been through, ...
1
vote
1answer
24 views

Using csom search api, how can I search lists based on content types?

I have multiple subsites and each subsite has a list called "Articles". Each has two content types. "News Articles" and "Success Stories". I would like to search based on the content types above using ...
1
vote
1answer
52 views

Save Excel file locally using client object model and C#

I have a scenario where I have been able to get the file that I want to download using a CAML query. I am using client object model approach. I need to save this file locally. Please guide how can I ...
1
vote
1answer
85 views

Modifying Global Navigation Settings in SharePoint Online

I am working on a PowerShell script to provision a site collection with a predefined hierarchy. Since the PowerShell breadth is so limited, most of this is done via functions that are CSOM code. As ...
1
vote
1answer
28 views

How to update item properties for an existing document found by search with CSOM?

You don't know which library it resides in, nor site, nor site collection. The only entry point is the search center URL or _api/Search endpoint. The problem is that when you retrieve the File it is ...
1
vote
1answer
100 views

How to Upload Images to SharePoint Online(Office 365) Picture-library using CSOM (Java Script)?

currently created Picture Library using csom on host Web in my last question, now trying to add some Images to that Library, So for that created Image folder into SharePoint Hosted App. how to achive ...
1
vote
1answer
92 views

breakroleinheritance for a folder powershell csom

I am trying to break permission inheritance for certain folders in my document library in office 365. However when $folder.BreakRoleInheritance($false) is executed I get an error: Method ...
1
vote
1answer
110 views

looping through subfolders in document library

I have a document library and I want to loop through all the folders I have in it. I have this piece of code $Context.Load($List.RootFolder.Folders) $context.ExecuteQuery() ...
1
vote
2answers
141 views

Get multiple list items by respective IDs - Javascript object model / REST API

I am developing a custom ribbon action as Sharepoint hosted app, where the user can select any number of list items and click on the action. On click of the ribbon action, the app redirects to the app ...
1
vote
1answer
89 views

How can I update a Site Column with the content of an array with javascript CSOM?

I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to ...
1
vote
1answer
24 views

Querying share point online Search via CSOM in provider hosted app using App only Access Token

The Scenario I am developing a Sharepoint provider hosted app. the Sharepoint app web is only used as a repository for storing documents in document libraries and The web application use O365 ...
1
vote
2answers
27 views

PowerShell CSOM set web inheritance

Piggy backing off my last question, Modifying Global Navigation Settings in SharePoint Online, is it possible to set a subsites navigation inheritance to use the same as the parent? If it is possible ...
1
vote
1answer
25 views

Display CSOM search results like OOTB list with filtering and sorting

I would like to display Search API results like OOTB Sharepoint list with filtering at least. Is it possible to use SharePoint javascript libraries to achieve this? If not, is there any ...
1
vote
1answer
30 views

Create content type from xml using client server object model

I have one xml in which all the declaration of the content type are added like <ContentTypes> <!-- All Content Type Declarations --> </ContentTypes> I can't use sandbox solution ...
1
vote
1answer
100 views

List all page under sub site with Sharepoint CSOM

I try to get all pages under a subsite with javascript. I'm very new to Sharepoint. I built an object to handle these queries, but i can't retrieve the pages. I can get the Documents list. Please ...
1
vote
1answer
156 views

Insert SharePoint 2010 list item type Multiple line text using C# and Client side object model

How do I insert a Multiple Line Text in a table column with nvarchar(50) How do I insert a Number into a column with int ClientContext context = new ClientContext("http://sp2010"); Web web = ...
1
vote
1answer
147 views

SharePoint Online - Update User Profile Properties via CSOM App

I have a console application where I am updating SharePoint Online user profile properties via CSOM. When I do it via the following code below (using a username and password), it works just fine. ...
1
vote
0answers
34 views

Sharepoint Online CSOM Powershell - Remove Permission level for a Group in a list

I have a list in which I want to remove "Contribute" Permission Level for a particular group "List Members Group". After removing this, I want to add "Read" Permission level. Basically, I want the ...
1
vote
0answers
21 views

Delete major version powershell csom

I have a document library where i have uploaded documents it has 2 major versions and i want to delete the first major version. Is there powershell csom code i can used to do this
1
vote
1answer
53 views

CSOM Could not establish trust relationship for the SSL/TLS secure channel

using (var context = new ClientContext("https://848-sharepoint:16543")) { var ss = new System.Security.SecureString(); ...
1
vote
0answers
16 views

Copy all folders in a library to another library [duplicate]

I have a Sharepoint library which is having 10 folders, i want to move those folders(along with files inside those folders) from one library to another library with in same site using CSOM**(C#)**. ...
1
vote
0answers
23 views

Is there any way to implement numbered pagination instead of PREV | NEXT using JSOM without using search

I'm wondering if there any way to implement Numbered pagination while retrieving items from a list like "PREV 1,2,3..NEXT" instead of just having "prev | next". I followed this code example MSDN and ...
1
vote
0answers
50 views

jQuery not showing custom error messages in PreSaveAction method of sharepoint 2013 list “New Form”

I am validating sharepoint list fields on PreSaveAction method of sharepoint list new form. I have done some customization and have put some labels with error messages under the sharepoint formfields. ...
1
vote
0answers
79 views

SharePoint 2013 CSOM where is Folder.MoveTo?

I have to implement a functionality of moving a document folder and was hoping to use Folder.MoveTo; But I don't see it in the Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime for ...
1
vote
1answer
26 views

Javascript code to write JQGrid data to excelsheet?

I am working on JQGrid, I found one solution but it is writing whole JQGrid on excelsheet. But I only want JQGrid data on excelsheet. My JQGrid data consists of sharepoint list data. So can anybody ...
1
vote
1answer
60 views

check if a user exists in a sharepoint site

Is there anyway to check if a use exists in a office 365 site. I am adding meta data to items in a document library and I am using ensureuser but if the user is not there I don't want it to be added ...
1
vote
0answers
37 views

Get spusercontext like _spPageContextInfo on page load

Is there any way to get the Current user details once the page loads in SharePoint 2013 like we get data for _spPageContextInfo I don't like to call below methods again and again var context = ...
1
vote
0answers
68 views

Create a new list from custom template with CSOM in SharePoint Online

I am trying to create a new list from an existing list template using CSOM in a SharePoint Online environment. Here is my code: using (ClientContext ctx = new ClientContext(WebURL)) { ...
1
vote
0answers
57 views

How to get the correspond listItem from the last major version of a file via CSOM

I am trying to get the last major version of a file in a sharepoint-list by using CSOM with the following Code: var web = clientContext.Web; var list = web.Lists.GetByTitle("MyList"); ...