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 (1)

0
votes
1answer
54 views

Get person or group field from list then query user profile

I am currently working on SharePoint 2013 on premise and I am trying to use JavaScript to get the latest 3 "new starters" from a SharePoint list then return information about them such as the ...
1
vote
2answers
43 views

Moving to client site development in SharePoint 2013

I am new to SP as a developer but experienced as SharePoint users. I am moving to SP development side ( I have depth .NET programming knowledge). As a first assignment I am in need to convert a ...
0
votes
0answers
22 views

Get Document Views from Client Side

We have a SharePoint 2013 intranet site that contains a Document List. There are .xlsx documents and .rdl documents. I want to know which users viewed which documents. I want to get this information ...
1
vote
0answers
22 views

Applying SharePoint theme using CSOM - The request uses too many resources

I have an Azure web job that provisions SharePoint Online sites and during the process it applies an out of the box SharePoint theme. The theme is determined by the process, but can be "Orange" or ...
1
vote
2answers
51 views

Fix 401 Unauthorized Exception uploading file to SharePoint 2010

I have a WCF service hosted in IIS on Domain 1. This service is accepting a request to upload a file, and then uploading the file to a SharePoint 2010 Server on Domain 2, using the client object ...
1
vote
0answers
15 views

2013 CSOM development-accessing List directly as user doesn't have permission to access teamsite

I want to perform CRUD to a list from a console app or Asp .NET website. I am granted access to the list, but not the team site: accessing this ...
3
votes
3answers
69 views

SharePoint DateTime issue when date is saved using CSOM

The timezone set in SharePoint Online is EST and when it is being saved to SharePoint using CSOM/ECMA script from location with UTC +5:30 timezone the date is reduced. Everytime we edit the time is ...
0
votes
0answers
7 views

Setting priority for Selects/Inserts?

I have an Azure Webjob, that runs some code once in an hour. It reads Data from a SharePoint-List, modifies it and updates the item afterwards. While these operations only happen once in an hour they ...
0
votes
0answers
17 views

Get HttpContext from ClientContext?

I have a ClientContext from a valid connection (AppOnly-Permission). Is there a way to get the HttpContext from that?
2
votes
2answers
46 views

Disabling tabular view

I have a bunch of views to create for a couple libraries that are all basically the same except for some filter values. I can create them in PowerShell using ViewCreationInformation. After a bit of ...
1
vote
0answers
37 views

How to upload document file and its version file using csom in C#

I have downloaded a document file (current version) and its version history files (old version files) from one of my sharepoint site list. Now, I want to upload that current version file into another ...
0
votes
0answers
35 views

Uploading multiple files to document library is not working correctly

I'm developing a web-part (a form basically) for Office 365 / SharePoint Online. This form contains a file upload for allows the user select multiple files. The problem that I'm facing right now is ...
0
votes
0answers
36 views

Display Template and Item Template not showing in Content Search Web Part

I am facing a weird issue. When I'm uploading custom Display Template JS file and custom Item Template JS file using an Add-In, for some reason it is not showing in the webpart properties. But when I ...
0
votes
2answers
39 views

Which permissions does my SharePoint Add-in need to get Site Collections?

I am building a Provider-Hosted SharePoint Add-in. Given a SharePoint Online tenant (account) where my add-in is installed, I want to get a list of their Site Collections To get this done I am ...
0
votes
0answers
17 views

How to get current master page from app page using CSOM

I am trying to get the current master page from the app page using CSOM. With the below code i am able to get the master page details from the following piece of code: var context = new ...
0
votes
2answers
50 views

How to get current master page using CSOM

I am trying to get the current masterpage using CSOM. Here is the code which i tried: var context = new SP.ClientContext.get_current(); var web = context.get_web(); var ...
0
votes
1answer
41 views

How to obtain an App-Only Access Token to use with CSOM for SharePoint Online?

I have a multi-tenant Azure AD web application set up. This represents a scheduled task that needs to get a list of Site Collections from each one of (the web app's) SharePoint Online Tenants. I am ...
0
votes
0answers
48 views

GetFolderByServerRelativeUrl Returns a folder from another web (CSOM)

I have a simple web structure: Site collection: var siteUrl = "http://hub-site/sites/home" Sub Site : var folderUrl = "http://hub-site/sites/home/subhome1" In subhome1 i have a document ...
0
votes
0answers
29 views

How to connect Office Add-In to SharePoint On Premise

I am trying to develop a Word Add-In and I need to retrieve a SharePoint list items. 1st Question: It is posible to write CSOM (c#) code instead Javascript? 2nd Question: How can connect to a ...
1
vote
1answer
30 views

How to handle currency values correctly in CSOM?

I have a currency field inside a SharePoint List. When I retrieve that field the result type is "double". As it should be according to the documentation. But we all learned that double is a bad ...
0
votes
1answer
21 views

Downloading file fails on the second download

I have the following code using CSOM to download a file from a sharepoint site: public IEnumerable<FileUpload> DownloadFiles(string client, Guid userGuid, IEnumerable<Guid> ...
0
votes
0answers
24 views

Copying more that 3000 items from custom one list to another by making use of jQuery SP Services in SharePoint 2013

I have a requirement to copy more that 3000 records from one custom list to another by making use of CSOM/jQuery SP Services in SharePoint 2013. My custom list contains around 160 columns. I have did ...
1
vote
0answers
20 views

.saveWebPartChanges() always re-enables 'Display search box' to checked

When I set JSLinks on WeParts with code: jsl.ctx.load(properties); properties.set_item('JSLink', JSLink); webpartDef.saveWebPartChanges(); It also resets the previously unchecked Display ...
1
vote
2answers
69 views

CSOM - find if content of library has changed

I would like to check within client application (CSOM), if there have been any changes to any files in library in eg. last 15 minutes. I know that there is list.GetChanges method in server-side ...
0
votes
0answers
23 views

Set property of SharePoint list item

I have list which has two Person/group column in sharePoint online. what I want do is,if column A has item x then show the column B with its items and if the column B has item y then show the column A ...
0
votes
1answer
26 views

Retrieve all Comments by UserId in Discussion Board

It try retrieving all Comments from a single person inside a discussion board. This is the CAML: <View> <QueryOptions><ViewAttributes Scope='RecursiveAll' /></QueryOptions> ...
0
votes
1answer
27 views

Get Team Site Shared Documents List Id reliably

Is it possible to get the list Id for the Shared Documents reliably. Currently I list all the lists and look for the following entry. "Shared_x0020_Documents" This is fine when look at english sites. ...
2
votes
0answers
27 views

CSOM - How to rename a Document library

Is there a way in CSOM wherein I can rename document library using CSOM like we do in SPD(renaming the root folder)? I tried several ways e.g updateTitle,FileLeafRef. Also tried to rename a folder ...
3
votes
0answers
70 views

Logged as another user

UPDATE : I've totally disabled the Distributed Cache, however, the problem is still there. For the record, I've applied CU7 for AppFabric as well as SharePoint 2013 Server March '13 CU. No luck so ...
2
votes
3answers
115 views

CSOM - CAML : Get document icon

I was using JSLink to change the display of a documents webpart. I was retrieving the document icon url set by Sharepoint for a document library item like this: (it can be shortcut icon ...
0
votes
0answers
13 views

How to get selected list item from the context menu

I have added a "Menu Item custom action" in the context menu of my sharepoint list. How do I get the selected list item on a page I have redirected to from the custom action. I need to implement ...
4
votes
0answers
68 views

First CSOM Program failes

Today I copied the following code from my book to test my first SharePoint-CSOM application, but I cannot get it to work properly: using System; using System.Collections.Generic; using System.Linq; ...
1
vote
1answer
30 views

Making sure nobody (but the add-in) can access a list

I create Lists inside the app-web of a provider-hosted-app(-addin) using CSOM: All access to that lists should only be done by the addin itself and not by the user. So I want to make sure nobody can ...
2
votes
2answers
133 views

IE Error DOM7009: Unable to decode image at URL

I am working on a SharePoint App. In my app parts I have used a few images. All the images are showing up properly in Mozilla and Chrome but a few of the images are not showing up in IE, I can only ...
0
votes
0answers
54 views

How Can I copy Publishing Pages & Site Pages with WebParts to another site collection in SharePoint Online?

I am looking for a solution which can help me to copy Pages (Publishing, Site etc..) from one site collection to another site collection in SharePoint Online. To meet this requirement I have tried ...
0
votes
0answers
12 views

Is it possible to query users who have alerts/subscriptions for a list?

Using the CSOM or REST API is it possible to query for users who have subscribed to alerts for a list? I attempted to Google it but didn't come up with much. Thanks!
1
vote
0answers
39 views

Accessing Sharepoint through CSOM

I am trying to access a project SharePoint 2010 site using the below code using (ClientContext _clientContext = new ClientContext("https://xxx/proj")) { _clientContext.AuthenticationMode = ...
1
vote
0answers
39 views

Create a custom permsetup.aspx and add extra text fields for new groups

I have the following requirement: When a user creates a new site via Site Settings\Site Content\New Subsite, and he selects "use unique permissions", the user is redirected to the page: ...
0
votes
0answers
28 views

ListItem.Update is updating only one column in a row?How to update the complete row

I am adding an items in a list from excel . It is adding rows but the value is inserted in only one column of each row.Below is the code foreach (DataColumn header in dtExcel.Columns) { if ...
1
vote
1answer
70 views

Delete 18 million items from workflow history list

I need to delete the content of the workflow history list that has 18 million items. I've tried the CSOM code below but it throws a time out error. I couldn't index any columns either through list ...
0
votes
0answers
29 views

Use CSOM Search API in app part to search across site collections

I'm not sure if I've asked the question correctly, so hopefully it isn't misleading. But basically what I'm doing is completely writing my own search page using the CSOM. In general, I have less ...
0
votes
0answers
27 views

How can I access promoted results using CSOM?

I am basically rolling my own search center using CSOM (because...I need the control to make this thing look decent!). How do I use all the query rule stuff with CSOM? There doesn't seem to be a ...
1
vote
1answer
120 views

SharePoint online c# csom download file

Hi I am having a requirement to download files from doc library using c# console app. the below is the code I use. ClientContext context = new ClientContext("https://siteurl"); ...
2
votes
1answer
46 views

How to get parentlist of a lookup column in CSOM

What I want is this using (Web web = lookup.ParentList.ParentWeb.Site.OpenWeb(lookup.LookupWebId)) { List list = lookup.r.LookupWebId.LookupList; Field ...
0
votes
1answer
17 views

Sharepoint hosted app to replace search center

So I've finally got the search CSOM to give me results back in my sharepoint hosted add-in/app. I can install/deploy it out, I can even add it to our catalog. I can then add the app in the site ...
4
votes
3answers
133 views

Check current user is SharePoint Administrator

Is it possible to check if the current account is a SharePoint administrator? The only way I can think of achieving this is by attempting to login to the https://tenant-admin.sharepoint.com and check ...
4
votes
2answers
60 views

Creating list content type using csom

I am not able to create a list content type using the below snippet. It throws a ServerException with additional information : The site content type has already been added to this list. var ...
0
votes
0answers
23 views

Connect to a SharePoint 2010 site having SSO authentication using Powershell

I am trying to connect to a SharePoint Site having an SSO authentication using PowerShell. But i am unable to do so. Please note, I am trying it from an external server so i have to do it using ...
1
vote
0answers
55 views

Add WebPart to Page with PowerShell

So I have the following code that I took from "http://adicodes.com/adding-web-part-to-page-with-powershell/". It works fine, until the $context.ExecuteQuery() in the AddWebPartToPage function, where ...
1
vote
2answers
40 views

Copy Taxonomy Field from one item to another

I use CSOM and I want to copy a taxonomy field from one list item to another. Can someone give me an example of this?