Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
10 views

How to obtain permission levels granted through AD?

I would like to know if I can Obtain permission levels granted through AD of each user; I'm working with CSOM. So far I can validate if it exists in AD and if it is added in some group of AD, I can ...
0
votes
1answer
21 views

Grant site Members group Full Control of document library in SharePoint Online

Using CSOM in PowerShell, I am successfully breaking inheritance on a document library and removing the visitors group. What I am failing to do is give the site Members group Full Control of that ...
0
votes
0answers
10 views

Set task custom field value for first time with CSOM

I have developed in C# a console application which updates task custom fields by using CSOM on a Project Online environment. Code snippet: string cInternalNameOriginalEstimate = cProjectContext....
0
votes
0answers
12 views

The controller for path '/' was not found or does not implement IController [on hold]

I am getting below error in Azure Application Insight when trying to access Index Page: System.Web.HttpException: at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance (System.Web.Mvc,...
0
votes
0answers
20 views

SharePoint 2013 CSOM Upload Doc and Change Column Values

I'd like to upload a document to a SharePoint 2013 document library and set value for three of the columns. I'm running following C# code from a unit test within Visual Studio: using (var ctx = new ...
0
votes
0answers
19 views

How do I refresh a ListItem or reload it from an URL

Problem: In the foreach below, I have 2 parts. Part 1 opens an excel File and modifies it Part 2 updates 3 of the ListItem fields Both parts work individually but with them both enabled, Part 2 ...
0
votes
0answers
28 views

update only current added item in list

I am updating RefCreated column in sharepoint list when new item is getting created. Problem is if 7 items are already there and 8th item is added by user all RefCreated field of items will get ...
1
vote
0answers
21 views

Is there any PowerShell or CSOM script in order to publish InfoPath forms to SharePoint Online?

I need to automate my task of publishing InfoPath forms to SharePoint Online using Powershell script or CSOM code.
1
vote
0answers
37 views

Check if Parent Folder contains more than 1 document and then delete particular document CAML Query SharePoint 2013 CSOM

I want to delete document with name 'Test' in CSOM. this document is present in subfolder. whereas code should delete this document only if its parent folder(i.e subfolder) has more than 1 document. I ...
1
vote
1answer
17 views

How many maximum number of sites will be returned from GetSitePropertiesFromSharePoint

I can find a number of articles on how to get all sites in SharePoint online and everyone referring to the below method https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/...
1
vote
0answers
15 views

CSOM - get deleted site collections

Is it possible to get a list of site collections deleted by administrators since a given timestamp using CSOM? We can do this with deleted sites using the changes api, but what about site collections?...
1
vote
0answers
22 views

2010 CSOM - Provision document set after creation

I have a requirement to programmatically create a document set in a library. I've done this successfully using the code below, however when I open the document set I see the yellow bar message '...
0
votes
1answer
20 views

Same document uploaded to two libraries when downloaded don't match

I'm uploading a Word document from my desktop to SharePoint via the browser (Firefox, although I don't think that matters). If I then download the file that I just uploaded and compare it with the ...
1
vote
1answer
27 views

How to Update Author (Created By) field in SharePoint 2016 using CSOM Programatically

I want to Update the Author field of Folder property/item property. I have seen many posts online, I tried different link but I didn't get the Success. I followed This Link. I didn't get any error ...
1
vote
1answer
36 views

Setting List Item Level Permission for SP 2016 using CSOM

I've been facing a very strange problem lately while working with Sharepoint Permissions using C#. The Scenario: What I want to achieve is to add a Read permission to an item (pdf document) in a ...
0
votes
0answers
12 views

Read all values from a column with “Append Changes to Existing Text” using CSOM

I am trying to read set of items from a SharePoint list where one of the multiline column, has the "Append Changes to Existing Text" property set to true. I tried using REST API and it fetches only ...
1
vote
0answers
11 views

Unable to add Custom ribbon on share point default landing page

I am trying to add custom ribbon on the default home page of the sharepoint online site. For some of the site collection the home page 'default.aspx' shows the custom ribbon but for some of other site ...
2
votes
1answer
48 views

Binding dropdown list field from Sharepoint list using C#

protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { DataTable dt = GetList(); ...
4
votes
1answer
129 views

upper/lower case naming convention for Document name in SPO Doc Lib

I have a situation where users have uploaded several files but without any naming convention. So some of the file names are in upper case while some are in lower case . So Now I have to build a script ...
0
votes
1answer
25 views

PNP script for all users with Full Control within a Site collection's sub-sites

Via PNP/CMOS, we are looking to export all users that are of Full Control permission level in an on-premise site collection. This site collection could have 300+ sub-sites. We are trying to figure ...
1
vote
1answer
25 views

SharePoint online audit

How to get sharepoint online audit data programatically without using Search-unifiedauditlog commandlet.
0
votes
1answer
26 views

create a clientcontext if legacyauth is false

How to create a client context if legacyauthprotocol is set to false.without changing the legacyauthprotocol using csom.
1
vote
1answer
38 views

Remove an external user access for a Folder/Document in a Document Library Programatically

I have shared a folder/document to an external user (outside the organization) in SharePoint online doc library. An email to the new user is shared with One time passcode to access the file. Now, the ...
3
votes
2answers
85 views

Project Online CSOM without using SharePointOnlineCredentials

We have a console application running every night which updates some project plans with CSOM. This uses the SharePointOnlineCredentials for authentication. But the IT departments wants to change the ...
1
vote
1answer
27 views

Creating a document library from custom template with Folder structure inside using CSOM

How can one create a document library from custom library template with Folder structure inside using CSOM? I have created my template and when creating an instance of that manually folders are ...
0
votes
1answer
33 views

csom - how to retrieve a file by its document id url without knowing the list

Is there a possibility to retrieve a file by its document id url without knowing the list in which the file is stored? I know I can do a caml query on a list. But actually the file can be stored in ...
0
votes
0answers
12 views

Move a node in Quicklaunch using csom

I want to move an existing quicklaunch node to become a childnode of another node. Using Server Side Object Model it is possible to move a node to the last position of a parent node. Example: ...
0
votes
1answer
19 views

Access denied while changing ContentTypeId

I got an error when I have Contribute permission for site: Access denied. You do not have permission to perform this action or access this resource. my code is uploading the file and then trying ...
0
votes
0answers
9 views

Optimize Retrieval of Multiple Lists

The below code snipped retrieves all items within each list in a subsite. Then filters by list title so that only information from lists containing "RDTEN" or "procurement" in their title get parsed. ...
0
votes
0answers
21 views

Create link in document library SPO

I'm trying to create a link in a document library pointing to another document library. Like this : But I want to do it by code in C# for SharePoint Online. I've followed numerous guides but can't ...
0
votes
1answer
92 views

CSOM + SharePoint Online - unable to get list item role assignments

I have made a very simple CSOM program where I have fetched a List Item and I have verified that it has listItem.HasUniqueRoleAssignments = true So with that being the case, I want to get the List ...
0
votes
2answers
43 views

CSOM CAML displays all fields

I would like to reduce the no of fields that I get from CAML query. The List has more than 100 fields, which is causing a lot of performance issues. In SSOM the SPQuery object has a query....
1
vote
1answer
49 views

Can't retrieve all Items from all lists that reside on a single subsite

SP Community, I am absolutely stumped and desperate for help. I have been up and down StackExchange trying to get 3 separate attempts to - 1. query all of the lists within a subsite and to then - 2. ...
1
vote
1answer
31 views

Export/Import Glabal term store

We are migrating Global term store from SharePoint 2013 to SharePoint Online. Can i get the scripts to export term store from SharePoint 2013 in a text file and then import that in SharePoint Online? ...
1
vote
2answers
62 views

SharePoint Online “User cannot be found” error

One of the users of a C# app I work on is getting the error "User cannot be found" when the app tries to read the following fields from a SPO file: context.Load(csomFile, f => f.CheckOutType, ...
0
votes
1answer
38 views

How To: Filter A Query on All Lists Based on Title Contains

I have queried all of the lists within a subsite but need to filter based on criteria in the title. I then need to display the filtered list contents. Is this possible if the list contents are not ...
0
votes
0answers
20 views

Retrive storage metrics data with JavaScript on SharePoint 2013

Is there any possibility to retrive data which is in ../_layouts/15/storman.aspx ? The way which mentioned below is not what I need. I need to learn folders size, % of Parent and Last Modified dates. ...
0
votes
0answers
34 views

how to set document set welcome page view programmatically using csom

I am trying to set default view of Document Set programmatically using .NET CSOM but no luck. So far, I have tried below. var revSet = DocumentSetTemplate.GetDocumentSetTemplate(context, ...
0
votes
1answer
28 views

How to get id of the modern experience id in sharepoint online?

How to get the id of the folder in modern experience Example:https://xyz.sharepoint.com/sites/sample/Lists/Special%20characters%20list/AllItems.aspx?id=%2Fsites%2Fsample%2FLists%2FSpecial%...
2
votes
0answers
18 views

I need to replace a Domain Group (Office 365 group) with another Domain Group (Office 365 group) on SharePoint Online

I have an Office 365 group added, for e.g. "ABC" which could be present at any of the below level. Permissions are broken at any level below Site Document Library Pages Page 1 Page 2 ...
1
vote
1answer
94 views

To connect to SharePoint Online Client Context using browser credentials from powershell

I am using below code to connect to SPO from powershell, but we have multi factor authentication in SharePoint. So I want to give credentials from browser instead of script. Please suggest as i ...
2
votes
2answers
42 views

SharePoint Online folder with “#” not found

I am using the SharePoint Online CSOM library (16.1.8316.1200) to retrieve info about a SharePoint Online folder using the web.GetFolderByServerRelativeUrl. This works great except for when the folder ...
0
votes
2answers
22 views

powershell to disable community template for the sub site in sharepoint 2013?

I have requirement in which, if a user creates a sub-site in a sitecollection then community template feature should not be available to him or he should not be able to see it.
1
vote
1answer
57 views

Managing the metadata of Document Sets using C# and CSOM

How to manage the metadata of document sets using C#+CSOM. Any sample code is appreciated. below is the code i tried for creating the document set. .... ..... ContentType ...
1
vote
1answer
18 views

Twitter feed programmatically on modern page

Building a mvc app for sharepoint. Anyone know how to programmatically add a twitter feed on modern page in sharepoint?
0
votes
1answer
29 views

Capabilities we can have inside remote event receivers

I have an on-premises SharePoint 2013 site, and the site has a custom list, and this list has an event receiver linked to it, where the event receiver do the following steps, when a list item is ...
1
vote
1answer
69 views

SharePoint Online/365 invite external user CSOM PowerShell vs C#

I have a PowerShell script that sends a user an invitation email. Which works. The user I'm testing with gets an email invitation to access the SharePoint site each time I run it. I got the script ...
0
votes
1answer
51 views

How to migrate Global term store from SharePoint 2013 to SharePoint Online?

We are migrating Global term store from SharePoint 2013 to SharePoint Online. Can i get the scripts to download the term store and then upload that in SharePoint Online? We want to upload/download ...
1
vote
1answer
27 views

How to get client assemblies within a Non SharePoint Machine?

I am running CSOM code in PowerShell to access data of SharePoint 2013 sites. I am adding below lines to load the DLLs in my machine. These lines expect these DLLs to be present in this location. Add-...
2
votes
1answer
30 views

How to get custom reusable workflow feature in CSOM?

I have created a custom reusable workflow in SharePoint Designer. I am facing an issue after deployment of workflow. I have to activate the workflow feature with CSOM but I am not able to get that ...