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.

Filter by
Sorted by
Tagged with
1
vote
0answers
211 views

SharePoint CSOM ExecuteQuery Intermittent 503

I have a section of code that goes and gets all of the documents within a document set based on document id. This code will typically function correctly but intermittently it will receive a 503 Server ...
1
vote
0answers
153 views

Add users to Sharepoint 2010 approval workflow using c#

Update: So I'm giving up on the code below and starting new. The suggestion from a more experienced SharePoint developer was to use Nintex Workflow. I'm currently testing it, and so far it looks ...
1
vote
1answer
23 views

CSOM content type

I have an issue with CSOM and content type, I used CSOM to read some value in a sharepoint list, it works well until I try to used content type If I create a new content type with my fields, it's ...
0
votes
1answer
238 views

Read List item including attachments CSOM Powershell - SharePoint 2010

I am trying to read list item and the attachments from SharePoint 2010 using CSOM Powershell. But I keep getting below error message Exception calling "ExecuteQuery" with "0" argument(s): "Field or ...
0
votes
0answers
216 views

Object returned by the following call stack is null. ListItemAllFields AddWithOverwrite Folders

I am working on Migration tool using SharePoint CSOM from file system to sharepoint, Everything was working fine until now i face new exception on some of the folder as mentioned below. Cannot ...
2
votes
2answers
140 views

fetch all places (lists/libraries/items) where permissions are given to 'Everyone' group

I am working on office 365 SharePoint site. I want to fetch all lists/libraries/items where permissions are given to Everyone group across SharePoint site using CSOM. Web web = context.Web; var ...
2
votes
0answers
123 views

SaveBinaryDirect returns “Unable to connect to the remote server” when code is deployed to our production server

I am trying to use SaveBinaryDirect to upload a file to a Sharepoint Online library. Everything works perfectly on two different workstations I tried on (Windows 10), but once deployed to our UAT ...
1
vote
1answer
99 views

Setting SetFieldValueByValueCollection CSOM and C#

I seem to be struggling to set multiple values into SetFieldValueByValueCollection Method. My code snippet below is: var fieldToUpdate = list.Fields.GetByInternalNameOrTitle("Enterprise Keywords"); ...
1
vote
1answer
757 views

SharePoint Online - PowerShell - CSOM ExecuteQuery Exception is Root Element is Missing

I am used to working with SharePoint on-premises environments, but I am now trying to come up to speed with SharePoint Online. I can connect to my tenant using Connect-SPOService and use the ...
0
votes
1answer
59 views

CSOM, GroupBy, specific ViewFields and system fields

From my SP library, I would need to retrieve a list of meetingID grouped by MeetingID. I tried several attempts with CAML but it didn't work: CamlQuery query = new CamlQuery(); ...
2
votes
0answers
56 views

Error after assigning permissions to a group using CSOM

After assigning permissions to a group on a Sharepoint list, the users of the group trying to access said list get the Microsoft.SharePoint.Client.ServerException: "The list « listTitleExample» does ...
1
vote
0answers
78 views

Adding tags to Sharepoint online Office 365 documents via C# and CSOM

I have a small project that requires migrating from Sharepoint 2010 to Sharepoint Online. According to Microsoft, tags have been discontinued. I have been able to add Enterprise Keywords and custom ...
4
votes
1answer
58 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 ...
0
votes
0answers
17 views

Re-upload a file to SharePoint Document Library SP 2013

I am working in SP 2013 On-premise. I am trying to re-upload documents from a folder in my local machine to my document Library. The code works fine. However, on downloading the document, I see no ...
3
votes
1answer
259 views

Is there a way to get all paging info for a list up front so that very large lists can be fetched in parallel?

I am using SharePoint online and SharePoint 2013+ onprem. I have written a CSOM rest program that fetches all the items in a list and fetches list items in 5000 item batches, the maximum allowed by ...
1
vote
2answers
49 views

Can not delete closed readonly site with SharePoint Online

I have a site which has site policy associated. based on my policy site is closed and marked as read-only. When I try to delete the site from Admin got an error "Couldn't delete site" One of the ...
0
votes
1answer
27 views

how to get file from library which stored in unknown folder( need c# csom)

I have library which has many folders and I have file name and want to find using name of the file from those folders (dont know in which folder that file placed). please help to write code using c# ...
0
votes
0answers
30 views

ClientRequestException when trying to check out a file

I'm getting an exception when trying to checkout a file within Sharepoint using CSOM (C#). I was hoping someone could shed some light on what might be wrong? This is a snippet of the code that's ...
0
votes
1answer
530 views

Get all document sets from a library using its content type id CSOM Powershell

I have to get all document sets from a library using its content type id, using CSOM Powershell. How to acheive this?Can anyone post some links related to this? Regards Swetha
0
votes
0answers
21 views

Create List Item with Taxonomy value in powershell Csom

i need help in creating a list item with taxonomy field value how can i achieve this i hardly cant find any resource for this functionality please help
0
votes
1answer
139 views

CSOM work with column with space in the name?

I'm trying to do an application which writes in another sharepoint list Today, I have a new trouble, if my column contains some spaces, my program returns me : Column does not exist So here an example:...
0
votes
2answers
403 views

Create Hub Sites using CSOM C# in SharePoint Online

I want to create a new Hub site and associate some of the existing sites to the Hub site using CSOM C# in SharePoint Online. I know how to do this using the SharePoint Admin center. But I want to do ...
0
votes
1answer
234 views

get all choice values from the field using powershell CSOM

How can we retrieve all the choice values in the choice field using powershell CSOM i hardly could not find any resources for this functionality any help would be appreciated
0
votes
1answer
270 views

Set Item Level Permissions on a SharePoint online library using CSOM PowerShell

I'm using this script below to upload a file or multiple files in a document library in sharepoint online. I would like to set only the 'read' permission so that only one specific user can read (see) ...
0
votes
2answers
229 views

update multichoice column using powershell CSOM

how do can we update multichoice column using powershell csom ? we need to update multichoice column for a list any help would be appreciated
1
vote
2answers
135 views

The remote server returned an error: (500) Internal Server Error for SharePoint 2019

I am using an ASP.Net app to connect to SharePoint 2019 using CSOM library. What i discovered is that every morning when i run my app i get the above error and when i switch to the SharePoint server ...
1
vote
1answer
555 views

How to edit Web Part properties in REST or CSOM?

This is a follow-up to my earlier question, How to get all properties of a Site Page using REST API?. Using REST in an AngularJS application, I was able to read the properties of the Web Part Page ...
0
votes
2answers
73 views

How to avoid triggering workflow on create when creating items through csom

I have a SharePoint Designer 2013 workflow that needs to be run on create. This workflow calls a Web Service method I have created, that creates a whole folder structure inside the folder that ...
1
vote
2answers
121 views

Returns all values from all columns in a list (CSOM)

I'm stuck to something probably very basics So the idea is the following: I have a list with 4 columns : Title, CostCenter, City, currency Via CSOM, I'd like to read this list, so I did something ...
0
votes
1answer
319 views

Wildcard Query for SharePoint Rest API

I tried using this example as search parameter "Share*" but the result return nothing. Interestingly,if i try searching for the word "share" i do get the result containing the SharePoint word. That ...
2
votes
1answer
134 views

CSOM Powershell eating up memory

What is the proper way to free up memory in Powershell when looping trough list items? This loop is slowly eating up the memory: for ($ID= 94368; $ID -le 98970 ; $ID++) # foreach ($ID in $Ids) { try ...
0
votes
0answers
25 views

Reading doc files from SharePoint returns null

My scenario: i am trying to read doc file from SharePoint 2019 server.My application is running on a separate IIS server. For docx file my code works well(not shown here) but not for doc. Error :...
0
votes
0answers
62 views

file.OpenBinaryStream cannot open file greater than 5 MB

I am reading file from SharePoint 2019 on premise and files that are greater than MB crashes the code. Error stating that Files greater than MB cannot be opened. I am creating an ASP.NET app using ...
0
votes
1answer
426 views

The remote server returned an error (401) unauthorized

I have install a fresh version of SharePoint 2019 which is on domain A,then i added a second computer to A which will be hosting websites on IIS. I have created a console application just for testing ...
1
vote
1answer
61 views

Unable to read doc extension file from SharePoint 2019

I am using the code below to read files from SharePoint 2019 server. It works perfectly for docx file extension but with doc files it throw an error. Can you guy s help me out here please? using (...
1
vote
1answer
97 views

Fuzzy Search in File content

My scenario : I am testing the search engine in SharePoint 2019 server. What i found out is that fuzzy search works in this way WORD then after i can place an asterisk(WORD*). What i am trying to ...
0
votes
1answer
234 views

Get Workflow Status Programmatically in SharePoint Using Client Side Object Model JavaScript

I am trying to monitor the status of workflows using JavaScript in the SharePoint Farm. List A: Number of Completed: In Progress: Error occurred: List B: ...
0
votes
0answers
220 views

Using SharePoint search API to crawl document with c#

My scenario : I have a SharePoint 2019 server that contain some documents with different file extension (ppt,doc,docx,xls,xlsx,pdf etc). I have manually forced indexing and crawling to make sure my ...
0
votes
0answers
118 views

Disable welcome email for 365 groups/modern team sites

Is there any similar for c# for those PowerShell command? Set-UnifiedGroup -Identity "DynO365" -UnifiedGroupWelcomeMessageEnable:$false I need to disable the welcome email when adding users from ...
0
votes
1answer
261 views

Bulk item Insert/update in SharePoint list using JavaScript

I want to add items in bulk (around 13000 entries) into the SharePoint list using the JavaScript. For this I have already user CSOM Client Context Batch insert code and also I tried the SP.Services() ...
0
votes
1answer
691 views

CSOM CAML query with ID row limit 1 returning list threshold error

I'm using the following CAML query in my CSOM code to try to determine the highest list ID in a list. I'm getting the standard list threshold limit error (because the list contains over 23000 items). ...
0
votes
2answers
122 views

How to authenticate to use SharePoint rest api

I am using the code below and am getting unauthorized access. Can you guys show me what i am missing here.I am using SharePoint 2019. string URL = "http://sharepoint/sites/test/_api/search/query?...
0
votes
2answers
65 views

CSOM Copy List Items

I was create Ribbon Custom Action, and try to copy list items selected to same list, but F12 error? what is the problem? function runCode() { var targetListItem; var values = SP.ListOperation....
0
votes
0answers
15 views

How to view all SharePoint 2013 Workflows in a custom web page using CSOM?

I would like to monitor all of workflows in my site collection using CSOM. What is the best approach to achieve it?
1
vote
1answer
424 views

check folder has unique permissions

I have a Folder structure like Below RootFolder-->Folder1,Folder2-->FF2 I want to check if RootFolder has Inheritance broken like below. It is not working what i am doing wrong Add-Type -Path "C:\...
0
votes
1answer
67 views

copied folder break inheritance fails

When i copy the folder with in same document library and trying to break inheritance it fails. below is the code for the same. Can any one help on the same Add-Type -Path "C:\Program Files\Common ...
0
votes
1answer
251 views

CSOM: Unable to update or create content type - Value cannot be null. Parameter name: s

When creating or updating content types using PnP/CSOM we are encountering the following error upon executing the query: Microsoft.SharePoint.Client.ServerException: Value cannot be null. ...
1
vote
1answer
52 views

Sharepoint client object model “File not found” Powershell

I have some issue when i try to create a folder, but the same issue come out when i try create file too. this is a sample of my code : $web_sp = $session_sp.Web $session_sp.Load($web_sp) $session_sp....
0
votes
1answer
16 views

how to know sharepoint server is foundation or standard using csom?

I want to know how to find out the SharePoint server is enterprise, foundation or standard using c#.
0
votes
1answer
557 views

SP2013: SPSecurityContext: Could not retrieve a valid windows identity for username 'DOMAIN\USER' with UPN 'user@domain.com'

I have the following SSOM in a console app using (SPSite site = new SPSite("http://localhost")) { using(SPWeb web = site.OpenWeb()) { Console.WriteLine(web.Title); ...

1
3 4
5
6 7
35