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
1answer
16 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
0answers
9 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....
0
votes
1answer
22 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
22 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
8 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
32 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
30 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
12 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
17 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
29 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
11 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
28 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
0answers
38 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
0answers
15 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
35 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 ...
0
votes
2answers
49 views

How to get cookies after obtaining Azure AD access token to SharePoint Online

I have been able to successfully use the ADAL library to obtain an access token to SharePoint Online and execute CSOM queries. When I try to access a SharePoint Online URL directly using a WebRequest, ...
1
vote
3answers
65 views

How long does it take to insert 150000 items in list Using CSOM?

I have a CSOM desktop application adding huge data in the list from a excel sheet. Its is taking 5 to 6 hours to upload 150000 entries(Not files). Does it take so long or can we improve performance. ...
0
votes
1answer
33 views

Error :“the given key was not present in the dictionary ” while creating publishing page in Powershell CSOM

I am facing error:"the given key was not present in the dictionary " while i am creating publishing page in sharepoint online using powershell CSOM. Here is my code: $subsiteCtx=New-Object ...
0
votes
1answer
16 views

Activating treeview navigation by CSOM?

I was wondering if it would be possible to activate treeview navigation using CSOM? I know it can bedone using powershell (TreeViewEnabled), but that doesn't directly translate to CSOM - at least I ...
1
vote
1answer
52 views

Can you modify a column in document library without checking out the file using CSOM?

I recently found out that you can edit a column in a document library without checking out the document using CSOM, but is that behavior really expected or is it a bug?
0
votes
0answers
46 views

unable to get all custom list templates from list templates gallery CSOM

I am unable to get all list templates from list templates gallery. I have uploaded all templates but only few are getting fetched... no clue what might be the the reason. Can anyone help me in this? ...
0
votes
0answers
29 views

“ExecuteQuery” with “0” args: "pageInfo.PageLayoutLisItem

I am getting exception while creating publishing page with pagelayout using powershell csom Error: Exception calling "ExecuteQuery" with "0" argument(s): "pageInformation.PageLayoutListItem" No ...
-1
votes
0answers
15 views

How to get informations of users in Sharepoint Online using CSOM? [duplicate]

How to get informations of users in Sharepoint Online using CSOM? I have a working powershell script that does this function $users = $web.SiteUsers $ctx.Load($users) $ctx.ExecuteQuery() foreach($...
1
vote
2answers
24 views

How to install and reference libraries for JavaScript CSOM in SharePoint?

I am very new to SharePoint and have written some code,in content editor web part, that interacted with lists and used some libraries that are available online like jQuery etc., my question is how do ...
0
votes
1answer
25 views

Convert Word file To PDF through Word Automation service using CSOM

I have to to convert Word file to PDF using WAS with Csom but on Microsoft.Office.Word.Server.Conversions.syncConverter method give exception of Could not load file or assembly 'Microsoft.Office....
0
votes
0answers
23 views

Version Conflict Error while Deleting multiple attachments in single list item [duplicate]

I want to delete multiple list attachments using C# CSOM on single list item. Below is my code which works fine for a single attachment but for multiple attachments, a version conflict error occurs. ...
0
votes
1answer
34 views

Rating Feature not disabling on SPO Pages - SharePoint Online

I have a requirement where Admin will have the ability to turn ON/OFF the rating feature for SPO Pages and the UI Control should be able to display/hide based on the setting. Steps for turning ON ...
1
vote
1answer
30 views

Set a default Search Vertical

My requirement was to delete Conversations vertical from the default SharePoint search verticals(Everything, People, Conversations, This site) and Default vertical was set to This site. But once I ...
2
votes
1answer
30 views

Populate User/People field in CSOM using Azure AD user ID

Ok so i've got access to MS Graph app that retrieves users. I already tested it and i can get back a lot of user info from which i have email, ID and others. Does anyone know of a way to populate a ...
0
votes
0answers
15 views

Best way to update large list that have workflow when update items

I need to update all items in a large list (19k items). That list have a workflow that handles on item update. I'm using CSOM to get all list items, and for each item I run a update query. The ...
0
votes
1answer
49 views

Querying Sharepoint Online From C# CSOM Console App

I am attempting to query SharePoint Online using CSOM but I am getting this error -> what do I need to change in my project to remove this error so I can succesfully query? System....
0
votes
1answer
38 views

Get Edit Links Created through CSOM

Is there a programmatic way of accessing through PowerShell/CSOM to get the Edit links created for the documents
0
votes
2answers
25 views

Groups not getting created when subsite is created powershell csom

I am creating subsite through powershell script csom. Subsite is getting created but not sharepoint groups under subsite. what could be the reason?Please respond
0
votes
0answers
23 views

KeywordQuery search does not work if I move the file from site to another site

I been working in a project where the user can move files from different folders and sites, when this happen the UniqueId of the file changes so I made my own Id and put it into a metadata field to do ...
0
votes
1answer
52 views

Async SharePoint Calls In CSOM

I am currently running one call to one Sharepoint site to get data, then when it completes, running a call to a second Sharepoint site to get data. I am thinking there must be a way to make both ...
1
vote
1answer
20 views

C# CSOM Console App To Return Data From SharePoint

I am attempting to query a SharePoint site and write data to the console. I am getting an error of the version of the request is 15.0.0.0 and it is not supported by the server. The server ...
0
votes
0answers
25 views

Get Specific list template CSOM powershell

How to get specific list template from list template collection in Poweshell CSOM. I got list template collection using following code: $cusTemplateColl = $Context.Site.GetCustomListTemplates($...
0
votes
0answers
13 views

Getting list of users (with email addresses) under a shared generic mailbox used in Sharepoint

I'm just wondering, is there any way to get user names and its corresponding info (i.e. email address) from a shared generic mailbox that is being used in permissions group in Sharepoint via ...
1
vote
2answers
61 views

WebRequest to Sharepoint site using Access Token returns 403

I need to create web request to specific page in SharePoint Online using Access Token in order to get certain Header information, but I keep getting 403 and I'm not sure why. After toying with access ...
1
vote
1answer
46 views

CSOM: Suddenly I can no longer ExecuteQuery due to 401 error

I have successfully been using some CSOM based scripts, but suddenly the CSOM parts are no longer working. For example, when executing the query below it errors with "(401) Unauthorized". # Create ...
0
votes
1answer
40 views

SharePoint 2013 CSOM with Mixed-Mode Authentication help needed

I maintain a Windows application that uses CSOM to allow users to check values in a SharePoint list and update it if necessary. It had been working fine using only Windows authentication. Recently ...
0
votes
1answer
30 views

How to get the ensured user from csom

I need to ensure the user from list people picker column using csom. Scenario: we have one user in AD and i have added one list item in 2017. The user was being added to the site at that time and ...
0
votes
0answers
11 views

Associate SharePoint 2010 workflow with content type programmatically

I have a requirement where I need to associate SharePoint 2010 Reusable workflow with content type using CSOM code. I googled a lot but did not come across any solution. Please provide reference ...
1
vote
2answers
76 views

How to determine if SharePoint server is hosted in cloud or on prem

I'm using the SharePoint Online CSOM library to access different SharePoint servers. I want to be able to determine whether the server I am connecting to is SharePoint Online or an on-prem server. I ...
1
vote
2answers
45 views

How to update createdBy(author) field using powerhsell Sharepoint CSOM

I need to update the CreatedBy(Author) field using CSOM Powershell Sharepoint Online. I tried: $user=$ctx.Web.EnsureUser("xxx@aa.onmicrosoft.com") $ctx.Load($user) $ctx.ExecuteQuery() $listItem["...
0
votes
1answer
14 views

WCF client web service - what do the TypeId's stand for?

CSOM speaks to SharePoint in WCF web service calls. Here is an example of a SharePoint WCF web service XML request from SharePoint 2010: <Request AddExpandoFieldTypeSuffix="true" SchemaVersion="...
0
votes
1answer
26 views

CSOM - get all UserGroup objects in a site collection

If you call the following CSOM code snippet to get groups from a Site Collection: ClientContext clientContext = new ClientContext(siteCollectionUrl); var groups = clientContext.Web.SiteGroups; ...
0
votes
2answers
35 views

C# MVC display items from sharepoint list

So...i created a Sharepoint Add-in (C# MVC) to get list information and create/update items. I've done the creating/updating in the past, not gonna tackle that now. My problem here is displaying the ...
1
vote
1answer
50 views

Add SPFx app to a SharePoint site via REST or CSOM

I have 300 Subsites and want to add my custom SPFx Extension to all those subsites. Manually I know how to archive that. I just go to site contents and add my app. But I want to solve this ...
1
vote
1answer
67 views

Reason for “AADSTS70000: Authentication failed. Delegation blob grant is malformed” error on SharePoint

When trying to get the access_token using the refresh_token for my SharePoint site using WebRequest i get the following error "AADSTS70000: Authentication failed. Delegation blob grant is ...