Questions tagged [csom]

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.

734 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
2answers
205 views

Correlate ChangeLog to a specific version

Goal: to be able to relate a ChangeItem from a Changelog to a version of that item. Issue: I can fetch metadata and version for a List Item. However, I am unable to relate a specific version of that ...
7
votes
1answer
389 views

How to find the last Logged-In time for the external user for a SharePoint online Site?

I need to know about the information for the external user last logged-in time over a site. Is it possible to get through REST or Client-Object Modal?
6
votes
0answers
383 views

How to set HTML field security using CSOM

Is there a way to set the HTML field security using CSOM? I already found a way to use PowerShell Scripts but i wondering if there is also a way to use CSOM. PowerShell: $web.ScriptSafeDomains.Add("...
6
votes
1answer
726 views

Site content type changes are not propagated to inheriting list content types

I have the following situation: I've created several site columns en site content types I've created several sub webs with list, inheriting these content types I assumed that if I updated the site ...
5
votes
1answer
3k views

How to upload an attachment to a list item using Microsoft.SharePoint.Client?

I am trying to create a new list item with an attachment. Below is my code: using (var clientContext = new ClientContext(_sharepointSiteURL)) { clientContext.Credentials = _credentials; var ...
5
votes
1answer
2k 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 ...
4
votes
1answer
74 views

Difference between EffectiveInformationRightsManagementSettings and InformationRightsManagementSettings

Microsoft.SharePoint.Client.File has above two properties. Can someone tell me details about them and difference between them. According to my research, when IRM on a library is enabled, the details ...
4
votes
0answers
760 views

Microsoft Graph: Get preview image

I created a SharePoint-Add-In (provider hosted) which serves as a proxy for retrieving information from Microsoft Graph. From the client I issue AJAX requests to my MVC-based web service which in turn ...
4
votes
0answers
536 views

SPBuiltInFieldId in CSOM?

Is there any alternative to SPBuiltInFieldId in csom /SharePoint online? Should you only reference field only by InternalName in csom/SharePoint online?
4
votes
0answers
255 views

What are _spPageContextInfo.fid and _spPageContextInfo.nid in SharePoint 365?

I am getting values as shown below while executing _spPageContextInfo.fid and _spPageContextInfo.nid in the console in my SharePont 365 site but am not getting for what these values are used here. ...
4
votes
0answers
165 views

Reading SPContentMapProvider with CSOM

Is there a way to get the information from SPContentMapProvider through CSOM? I have not been able to find any API endpoint for this in CSOM or REST. I'm trying to build my own breadcrumb control for ...
4
votes
0answers
1k views

Attach Event Receiver to SharePoint Document Library using CSOM C#: 2010

I have created an Event Receiver Assembly and installed in GAC as shown here. In that assembly I have override ItemAdded and ItemUpdated events. The assembly has been successfully installed in GAC. ...
4
votes
1answer
212 views

How to retrieve column names in other languages with CSOM?

I am trying to retrieve display name of a column in all languages available in my SharePoint installation (currently English and German). internal static void TestColumn(Microsoft.SharePoint.Client....
4
votes
1answer
848 views

SharePoint Workflow Subscription Service failed

I have one requirement to start the SP workflow through JavaScript. For this, I have wrote some lines of code to start the workflow. But I am getting a Subscription failed error due to undefined ...
4
votes
2answers
226 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 ...
4
votes
0answers
2k views

“Value cannot be null” exception while loading WorkflowServicesManager

I am trying to start a list workflow in SharePoint 2013 using client object model. But while loading WorkflowServicesManager, it throws the error below - Value cannot be null Parameter name: ...
4
votes
0answers
2k views

SSL certificate error when using Client Side Object Model

I wrote an app that gets information from some Sharepoint 2010 lists and displays it to the user. It works fine on my development machine.But when I copied the exe to another desktop machine I got the ...
3
votes
0answers
76 views

I am no longer able to debug/run my SharePoint Remote Event Receiver locally using Ngrok

Last month the below steps were working well for me to debug and test a SharePoint online remote event receiver locally:- Open Ngrok.exe >> run the following command inside ngrok:- ngrok ...
3
votes
0answers
229 views

Difference between camlQuery.AllowIncrementalResults=true and camlQuery.AllowIncrementalResults=false?

My aim is to get all items from a SharePoint List (>5000 items). I have used the standard pagination based approach and it is working fine. ListItemCollectionPosition position=null; do{ ...
3
votes
0answers
277 views

PnP PowerShell - how to load all properties of a ClientObject?

Given a PnP cmdlet such as Get-PnPList there're a bunch of properties available but they're not populated upon executing the cmdlet. I'm looking for a way to load all of them, in a single call. I ...
3
votes
0answers
276 views

SharePoint CSOM crashes IIS App pool

What I’m trying to achieve here is a MVC website that gets some info from SharePoint. I did that on VS 2017, works perfectly. This is the code: var ctx = authManager....
3
votes
1answer
671 views

SharePoint 2010 JavaScript CSOM- Updating list item by id - Anonymous user - Access denied

I am using SharePoint 2010 JavaScript Client Side Object Model to create and update list items on a SharePoint Survey list. In my use case users are anonymous . New items are created properly (...
3
votes
1answer
411 views

Office 365 document Library ItemAdded event is not firing

Event is attached to document library, but it is not firing when I upload document. Below is the Element.xml file. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="## Heading ##http://...
3
votes
1answer
299 views

User.Groups has no groups even though they are loaded

Hi now that we have upgraded (or in the process) of upgrading to SharePoint 2013 I though I'd try and take advantage of some of the new features that it has to offer in the CSOM API. One is that User ...
3
votes
0answers
249 views

how to deploy a remote event receiver to azure

I created my first event receiver using this link but now i need to deploy the the final version of the app. I think i need to create a web app on azure and publish the web project How do i ...
3
votes
0answers
37 views

how to change the Connected SharePoint site Settings Programmatically?

I want to retrieve the "Connected SharePoint Site" Settings programmatically and also change the settings if they are different from my required criteria.
3
votes
1answer
1k views

(401) Unauthorized exception while downloading file from SharePoint

I have generated an access token using OAuth mechanism for SharePoint Online server. I am using this token to create ClientContext using CSOM. While I am able to access all the sites, libraries, and ...
3
votes
0answers
117 views

SharePoint Online: Skip Property doesn't work with Order By in paging using CSOM

I am trying to fetch the contents of Document Library using paging. For this, I am skipping the resources using ListItemCollectionPosition and getting maximum resources using <RowLimit> in ...
3
votes
0answers
37 views

SharePoint Hybrid 2013 + SPO365 CSOM REST

once the environment is set up, is it possible to create a Cross-Domain JSOM or REST calls to get data from Site Collections from Both On-Prem and Online Sides using the SharePoint Hosted App Add-in ...
3
votes
0answers
40 views

Is it possible to start traversing SharePoint from a certain sub folder in Document Library?

I want to know if it is possible to start traversing SharePoint artifacts from a certain subfolder or if traversing always starts from the root folder. I need this for a method I'm writing so that in ...
3
votes
0answers
42 views

PnP Provisioning engine apply same configuration to all lists of a certain tpye

As far as I can see from the PnP provisioning engine, each list instance needs to be specifically defined in the XML file. Is there a way that you can define one particular configuration to apply to ...
3
votes
0answers
51 views

Build url of publishing page by lookup id

Got a list with a LookupField to Publishing Pages library pointing on "Title" and additional field "ID". I would like to create a hyperlink by CSOM / javascript without querying FileRef on pages ...
3
votes
1answer
52 views

full control site setting

In site setting I want to hide a link in the Site Actions group from the Full Control users. Anyone can point me to the right direction?
3
votes
0answers
308 views

CreateSite throws error Value cannot be null. Parameter name: source

We are facing an unusual problem, and its limited to few Tenants. Scenario: We are trying to create site collections using below code try { var tenant = new Tenant(adminContext); var ...
3
votes
0answers
947 views

SharePoint Online CSOM: Get value behind list item lookup field

I'm trying to get the value behind a list item that is a lookup field. The list item is a clickable string that has a URL attached to it. Here's a screenshot (German language, though). I want to ...
3
votes
0answers
43 views

javacript error when adding to a MMS/Taxonomy field in sharepoint online (ie11)

I have a brand new sharepoint online tenant. (actually I got the problem below, deleted the site collection and re-created it again). Im using csom (C#) In the CA-->managed metadata I have created a ...
3
votes
0answers
254 views

In CSOM - Utility.ResolvePrincipal not returning null - For any user it is resolving

I am writing code to get Display name based on UserEmail. But even if i give junk email also it "ClientResult principal" not returning null. This is my code. If i give correct email id - i am getting ...
3
votes
1answer
425 views

Using the OData endpoint to update or insert assignment in Project Server 2013 On Premise

Objective Connect to Project Server 2013 in order to update an existing assignment of a resource to a task or create a new assignment for the resource in case it (the resource) is not assigned to the ...
3
votes
0answers
372 views

SharePoint 2013 cmscore resource wrong translation for List_Pages_UrlName

I am using CSOM to get dutch translation of the 'List_Pages_UrlName' field in cmscore.nl-NL.resx resource file from the Dutch language pack. // Get the language of the web var context = web.Context; ...
3
votes
1answer
1k views

Powershell CSOM folder.Files.Add(FileCreationInformation) Working earlier, Fails now?

Using Powershell and CSOM, on Sharepoint Online, I have successfully upoaded 300K pdf files w/metadata into folders in document libraries. Today, though, the same code is failing to Add files... ...
3
votes
0answers
482 views

Test if user has access to a web

We are trying to create a function to see if the logged in user has access to a web (subsite), and have come up with the following code; CheckPermissionOnWeb(); function CheckPermissionOnWeb() { ...
3
votes
1answer
89 views

Export the .aspx form as it is to Excel Custom Webpart SP2010/2013

I have to show the list of users on the page (On which the particular web part is added) that whole page have to export as it is to the Excel with formatting. So is it possible with the custom code or ...
3
votes
0answers
193 views

Retrieve SharePoint 2013 site collection information using CSOM

I have been trying to retrieve SharePoint site collection inside a different ASP.NET web application using CSOM as follows. using (var context = new ClientContext("https://sharePointSite/")) ...
3
votes
0answers
196 views

Create and assign custom view to particular document set using CSOM C#: 2010

I have a Document Library and Document Set within that. Now my requirement is that I want to create a custom view which should be applicable to particular Document Set only. As I am having large ...
3
votes
1answer
3k views

CSOM The request uses too many resources error while provisioning web

I am provisioning web on SharePoint online using following CSOM code(provided hosted app), but intermediately we are getting "The request uses too many resources" error. using (ClientContext ...
3
votes
0answers
443 views

Setting InplaceSearchEnabled via PowerShell in SharePoint Online

I am trying to create a script to modify several web parts in a site collection so I don't have to go through the tediousness of doing it 50 times through the browser, but I seem to be running into a ...
3
votes
0answers
479 views

Can a SharePoint 2010 workflow be created with CSOM in SharePoint 2013?

I would like to be able to create definitions for SharePoint 2010 workflows using XAML from an existing workflow in SharePoint 2013 without deploying a solution. Sharepoint 2013 includes methods ...
3
votes
1answer
2k 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 ...
3
votes
0answers
90 views

Method GetAppInfoByName does not exist?

I am trying out the tenant APIs towards an on-premise SharePoint 2013 Server install. This server is up to the October 2015 CU. I following the guidance on Vesa's post: I registered the server-stub ...
3
votes
0answers
597 views

How to get a users' permission in Client Context model C#

Any idea how to convert the following code part to Client Context Model SPRoleAssignment currentUserRole = web.RoleAssignments.GetAssignmentByPrincipal(user); //Go through all Role Definition ...

1
2 3 4 5
15