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

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
18 views

How to create XML file from SharePoint word document stored in SharePoint Online document library using script (may be CSOM)

I need to create a XML file out of a word document stored in SharePoint online document library. XML file should contain the text of the word document and metadata values of a word document. Auto ...
1
vote
1answer
32 views

Is there a way to get CSOM ClientContext by having cookies and a Form Digest?

I have been trying to do an interesting proof-of-concept/experiment Get SharePoint user's cookies from the browser Pass these cookies to an Azure Function By having cookies only - determine who the ...
0
votes
2answers
40 views

How to load all list items using caml query?

I'm using SP 2013. And I have a Wiki Page Library. I try to load all items from this list. I'm using the following code: var context = new ClientContext("SiteUrl"); context.Load(context.Site); ...
1
vote
0answers
17 views

Modify the List View Web part's Miscellaneous ( Form Template Name ) value using C# in SharePoint 2016

Is there any way to change the List View Web part's Miscellaneous ( Form Template Name ) value using C# in SharePoint 2016
0
votes
1answer
20 views

add listitem to custom list

when i try to add listitem to custom list by CSOM there is a problem in getting the name of fields field name in the list is"Pieces Unaccompanied Hold Baggage(Rush)" ,but when i try to add item ,error ...
1
vote
1answer
21 views

How to programmatically change a user field restricted to a single Sharepoint group in CSOM

It possible in CSOM to change a user field to restrict the People picker to a single Sharepoint Group?
1
vote
1answer
145 views

Programmatically Add link to Homepage

The question is quite basic however I'm not able to find any "links" to it... I want to customize Homepage, programmatically adding hyperlinks as you can "manually" do from "Edit" page. How to ...
1
vote
1answer
18 views

Programmatically Delete Web Part

I have been able to add a web part, thank to this post, using code like: limitedWebPartManager.ImportWebPart(webPartSchemaXml) However now I'm not able to remove the Web Part anymore by Editing the ...
1
vote
1answer
32 views

SPFX, CSOM for SPO Development

I need to surface some information from SPO within SPO page. I am familiar with on-premise CSOM script webparts where I simply added JavaScript and CSOM code. In SPO, can I still use the same ...
0
votes
0answers
11 views

Update an Event receiver with csom

i just finished writing my methods for registering and deleting an event receiver from a sharepoint list. My questions is if it is possible to update an event receiver on a sharepoint list without ...
1
vote
1answer
32 views

CSOM - Trying to access “Client_Title” from a page in a list - “The property/Field has not been initialized … ”

I'm trying to access the "Client_Title/Page Title" from a page in Site Pages using Client Context and "listItemId". It seems that I'm not requesting or loading it the correct way. When debugging I ...
0
votes
0answers
23 views

Does SharePoint temporary store client credentials (somewhere)?

I am trying virtually sign out user from client app side by providing non existing credentials and expecting to get WebException (401) Unauthorized when i do any query, but instead i successfully got ...
-1
votes
0answers
10 views

Information Management Policy Settings using CSOM in SharePoint Online or using any client API

Is it possible to set the Information Management Policy Settings for content types in a document library using CSOM in SPO...??? I am trying to set the label for the document content type in a ...
0
votes
0answers
11 views

Is there a way to add a check-in event handler using client-side code?

Using SP2013. My site has a document library of Excel files. I have client-side access to modify the site via Sharepoint Designer 2013. I'd like to set up an event to fire when a document is checked ...
0
votes
1answer
27 views

Creating an entry as item list from another document library

I have two document libraries. Whatever is in document library A, I would like to get an entry in library B as item list with the following properties (Name and itemCode).
0
votes
0answers
10 views

How to select list versioning settings from WSS_Content?

I need to change the settings on the image bellow via csom: So it's pretty obvious: SP.List l = new SP.List(...); l.EnableModeration = true; l.EnableVersioning = true; ...
0
votes
0answers
36 views

Executing code for both SharePoint Online and SharePoint Server 2016

I am trying to write some code that can - by configuration - target both SharePoint Online (Project Online) and SharePoint Server (Project Server). The Project Server 2016 is using NTML for ...
0
votes
1answer
24 views

Insert Row in sharepoint list form newform using jquery

How to add a tr in between rows in share point Newform using jquery? Attached is the DOM of my sharepoint form. . I tried like this but it inserts inside the inner table of the form var attachHTML='&...
0
votes
2answers
46 views

SharePoint Online: Cannot read user profile property via CSOM / PnP - why?

We created a custom user profile property. We want to read it's value via CSOM (or PnP, doesn't matter). We fail. Our property is not returned in the list of user profile properties. Other ...
0
votes
1answer
21 views

Iterate through all document libraries and folders within libraries to set a column value

I am trying to create a PowerShell script/function that will iterate through all the Document libraries (and folders within them) to set a column value on every file on the SharePoint site. The ...
0
votes
1answer
12 views

TaxonomyInternalService.GetSuggestions Microsoft.Sharepoint.Client equivalent

With the TaxonomyInternalService.json/GetSuggestions endpoint, I can retrieve all terms with synonyms that start with some specified text. I am attempting to do this with Microsoft.SharePoint.Client....
0
votes
1answer
21 views

Power BI webpart not visible when adding it with OfficeDevPnP

I am creating a console app that will create sitepages with certain webparts in it. To Manage this I am using OfficeDevPnP and how I do it is described in the text below. The issue here is that the ...
0
votes
3answers
53 views

SharePoint on prem get site display name?

I have a question regarding the sharepoint on prem. I got a code that get the title of a sharepoint team site using CSOM, more specifically unsing the Title property and show this title in a Episerver ...
1
vote
0answers
24 views

How to get SP list versioning properties from WSS_Content database?

I need to set all list versioning properties via csom. All properties I usually set with following code: SP.List l = new SP.List(...); l.EnableModeration = true; //1 l.EnableVersioning ...
2
votes
3answers
42 views

CSOM - get list instance from URL is not working

I'm developing a C# console application that queries some items from some lists. Most lists are in a sub-site, but one of the list I need to query is in the root (or main) site. Example: The sub-...
0
votes
0answers
10 views

How to create a link to an Add-In

I want to edit my Home Page and add a link to an Add-in I have installed. I know how can add a link, but the problem is: what I have to write as url? PS. If I over the mouse over my Add-In, in the ...
0
votes
0answers
8 views

Show default Office templates in library with custom content type

I have a site collection with thousands of modern libraries, all using the same custom content type in SharePoint Online. If an employee wants to add a new word or excel document to one of those ...
0
votes
1answer
29 views

Access denied when downloading file through CSOM, but can download through UI

I need to download a couple of files from a client's Sharepoint. Here is my code: using Microsoft.SharePoint.Client; var username = "username"; var password = "pass"; var url = "https://myclient....
-2
votes
1answer
66 views

Add “Everyone except external users” to sharepoint visitors group using powershell CSOM

I want to add "Everyone except external users" group to SharePoint visitors group using powershell CSOM. I googled it but didnt find correct script. Can anyone help me in this. Please respond ASAP. ...
-1
votes
0answers
247 views

Getting 400 bad request error while executing CSOM code in azure timer function

I am getting 400 bad request error while executing CSOM code in an Azure timer function after ExecuteQuery function. The code was executing successfully in Visual Studio but not executing in the Azure ...
0
votes
3answers
29 views

caml query that searches for specific records

hello everyone form this query to find column records until this moment works for me but when I want to add that look for other records of the column department gives error I would appreciate your ...
0
votes
1answer
38 views

how to get the title of specific columns from a sharepoint list CSOM C#

hello I have this code with which I get all the columns of sharepoint list, but now I want to get certain columns in specific how I could do it or can you suggest me how to do it through caml query ...
0
votes
0answers
13 views

Alternatives to broken Table of Contents web part

I am making an Enterprise Wiki in Sharepoint Online using the Client Object Model. I would like to display a Table of Contents on a page to act as a sitemap - meaning it should show subsites and pages ...
0
votes
1answer
64 views

Update MultiValue Lookup Column using CSOM

I am trying to update a multi value lookup column in SP 2013 On Premise. I have gone through various forums for achieving this and as suggested, I am getting values in SPFieldLookupValueCollection. ...
1
vote
1answer
15 views

Get SharePoint user from WebApi2 Identity

I have a WebApi2 endpoint where supportCredentials flag is set to true. On the IIS the Anonymous Authentication on false and the Windows Authentication on true. What I'm trying to do is to load the ...
1
vote
1answer
89 views

How to get site ID without access to central admin or powershell

I was trying to follow this post for setting the owner of a SharePoint group using client side code. Evidently the REST /_api/web/sitegroups(id)/owners endpoint isn't functional. The XML formatting ...
0
votes
1answer
22 views

Upload new files from local computer to SharePoint online library

I have a script that generated a user report to a csv file. Which work properly. I have added a section to upload all the files from the local computer to the SharePoint library. Which also works fine....
1
vote
2answers
57 views

Unable to get the specific list/library contenttypes csom powershell

I am unable to get the specific list/library contenttypes using csom powershell. Getting error:"The collection has not been initialized. It has not been requested or the request has not been ...
0
votes
0answers
36 views

Is it possible to get the group permissions associated with sites, lists and Items through CSOM

I am trying to get the URLs (sites) where the given group permissions are associated with. But could not see any such property in CSOM code. I am using the CSOM code snippet given here as part of the ...
0
votes
0answers
14 views

Remote Event Receiver Read Email(.eml file) content and attachment

I have one document library name InvoiceEmail that contails .eml files in it. Now I have a requirement that using Remote Event Receiver I have to read To, From and Subject values of the .eml file ...
1
vote
1answer
38 views

Get the list specific rows from sharepoint where value exist

I am working in c# and I have a list of strings which contains the projectid of the SharePoint list List<string> guidlist = new List<string>(); // contains project ids On the basis of ...
1
vote
1answer
39 views

How to set Enterprise Wiki page categories with Client Object Model

In Edit mode, I can add categories to an Enterprise Wiki page by just clicking the button and entering some text. The keywords are added to the page but also to a site pool so they can be selected and ...
0
votes
0answers
29 views

O365 modern page comment author spoofing C# CSOM

I am trying to add comments to a modern page in SharePoint Online on behalf of an existing user. I cannot find any documentation on how to do this. I am able to add a comment to the page on my behalf ...
0
votes
1answer
31 views

Site collection audit settings for Sp online using CSOM

I can set all the audit settings for my site collections using the following powershell script, works great $Site= $ctx.Site; $audit = $site.Audit; $ctx.Load($site); $ctx.Load($...
1
vote
1answer
40 views

How to use CSOM TermSet.GetTerms method? Receiving strange null error

I have a piece of code in which I want to check if a specific Term is available within a TermSet. The TermSet is quite large, so getting all Terms is no option here. My code looks like this: Getting ...
1
vote
0answers
14 views

SSIS inserts empty list item when not debugging

I have a very strange behavior. We are using SSIS to populate SharePoint 2016 list from a SQL data source. For some lists everything works perfect - but for some reason the list items in a few lists ...
0
votes
1answer
31 views

How to access another Site with event receiver?

I am doing an event receiver which updates a list from another Site, I don't know how to access another site using CSOM
3
votes
1answer
72 views

Cannot add Table Of Contents web part using the Client Object Model

I am trying to add a Table-of-contents webpart to an Enterprise Wiki page using the Client Object Model in a custom migration Add-in for Sharepoint Online. I have exported the xml for the webpart ...
0
votes
1answer
37 views

Setting default content type in Sharepoint Framework

I'm creating a list and then adding an existing content type to it. Is it possible to set the content type as default? Or would it be possible delete the primary content type? Here's my code. Thanks ...
0
votes
1answer
68 views

Remove specific user permissions from one folder in Sharepoint online with powershell

I am having trouble figuring out how to remove a specific user from a folder. I have sharing the folder with the user working, but cant seem to get it to remove.... below is where i am at... any ...