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
0
votes
1answer
14 views

Getting all shared files and folders from a given site

Is it possible to get all files or folders that has been shared from a site in one batch, or do you need to iterate each single file and folder on the site?
0
votes
1answer
12 views

powershell query row limits for SharePoint online

I am not a super scripter, but I have a requirement run a search query over a site with multiple libraries. The query is for all documents where a specific string (someone's name) appears. I have 2 ...
0
votes
0answers
10 views

Adding LastItemUserModifiedDate to an array in Sharepoint Online

I am currently working on a script that will loop through every site with the site status "Unlock" and display the details of the last time the site was modified by a user. In the future I ...
0
votes
0answers
10 views

In CSOM how to remove values from FieldUserValue[] field

In CSOM how can I remove values from FieldUserValue[] field. Here is my current code: FieldUserValue[] finalApproverColl = (FieldUserValue[])ApprovalItem["FinalApprovers"]; if (ApprovalItem[...
0
votes
0answers
6 views

Add navigation link 'old school' to a Hub menu

I know how to do it with PnP, but I would like to do it wit classic CSOM. The Hub menu is not part of the Web.Navigation object, like the the QuickLaunch or the TopNavigationBar,
0
votes
0answers
22 views

Project Server - Updating notes on a task through REST/CSOM

I've been racking my brain over this for a while and Googling has failed me so I was hoping I could get some help here. I just want to be able to update the Notes field on a Project Task in Project ...
1
vote
0answers
13 views

Updating calculated field formula via CSOM with non-english regional settings fails with “The formula contains a syntax error or is not supported.”

In our current project we programmatically provision site collections, site columns and content types using CSOM/PnP. During this provisioning process the initial locale id is switched from 1033 to ...
0
votes
1answer
22 views

Can we disable remote event receiver from firing inside remote event receiver

I am writing a remote event receiver for our online custom list, and the RER itself do some updates to the item been added/updated, where this is causing my RER to keep firing. so is there a way when ...
0
votes
1answer
39 views

Adding security group via EnsureUser failed: 'The specified user could not be found'

target: SharePoint Online, Azure AD code environment: Azure Functions, .Net Core goal My goal is to ensure a user to a SharePoint site programmatically (via CSOM) and this user is a Security Group. ...
1
vote
1answer
20 views

Make a rest csom call - error in body

I'm using a flow http request and wish to update a sharepoint column with the following uri: _vti_bin/client.svc/ProcessQuery It all works , but when i try to add html tags, <a href="https://...
0
votes
0answers
20 views

SharePoint High Trust some users getting 401

Hi I've created a High Trust application, but some users seem to be getting the 401 from time to time. I've got a hunch that it's down to them not logging off and something not 100% accurate with ...
0
votes
1answer
25 views

Retrieve SharePoint 2010/2013 workflows in SharePoint 2013 using CSOM

I need to write CSOM Code to retrieve SharePoint 2010/2013 workflows. I am able to get 2013 workflows only. Below is the code: WorkflowAssociationCollection workflowcollection = list....
0
votes
0answers
65 views

C# CSOM PnP AuthenticationManager Connection Issue

Environment: SharePoint Online (Office 365) Visual Studio 2019 .NET Framework 4.5.2 SharePoint PnP Core Online 3.8.1904 Microsoft SharePoint Online CSOM 16.1.8715.1200 I created a console ...
0
votes
2answers
33 views

Proper format for username when passing credentials to SharePoint online in CSOM

I'm trying to connect to SharePoint online to read list data. Problem - I need to use a service account since these accounts have passwords. The credentials class needs a password and our user ...
1
vote
1answer
21 views

server error access SharePoint vm

Have anyone tried to connect Sharepoint url to access sp vm hosted on azure through C# CSOM using (ClientContext ctx= new ClientContext(siteurl)) { ............ . . . . . .. . . . ctx.Load(web); ctx....
1
vote
2answers
31 views

Inside CSOM what does Web.SiteUsers include exactly

I am a bit confused on what does Web.SiteUsers include in CSOM? as per the documentation it includes the users which belong to a site collection, but what does belong mean? Does it mean users who have ...
0
votes
1answer
14 views

How to authenticate sharepoint 2013 by FedAuthCookie in .netcore3.1.0

I am developing web application in .net core 3.1.0, for that i have to get documents stored in sharepoint 2013 using CSOM, the sharepoint app authenticates by FedAuthCookie. In this Microsoft docs, it ...
0
votes
0answers
10 views

Clear resource field value via CSOM

I'm trying to sync resource data from an external system to Project Server 2019 using C# and CSOM but I cannot find a way to clear TerminationDate value of an EnterpriseResource. The property is non ...
0
votes
2answers
42 views

Using CSOM can i ensure the user using the login user id instead of the login username

I have the following CSOM code inside my remote event receiver: ListItem listItem = context2.Web.GetList(context2.Web.ServerRelativeUrl + "/lists/Assets").GetItemById(listItemID); context2....
0
votes
1answer
47 views

How to download all of the files under a specific folder using CSOM from SharePoint Online?

I have a folder structure similar to this on our SharePoint Online site: Documents/ Drawings/ For Review/ Released/ Archived/ Documentation/ For Review/ ...
0
votes
4answers
46 views

Authentication with SharePoint Online in Microsoft 365 and simple console application

I need your help with my small application. I need to create easy console application which will sign into SharePoint Online and download some documents from library. When I am doing this on older ...
1
vote
1answer
27 views

Is it possible to set a property bag value via CSOM without having tenant permissions?

I'm trying to use my backend CSOM app with context of Site Collection Administrator service account to programmatically set a property bag value to store some settings for my frontend extension app. I'...
0
votes
2answers
28 views

$context.web.contenttypes is null | CSOM & PowerShell

I am trying to get a list of content types with PowerShell using CSOM. I was able to get list of fields, however when I try to get a list of content types, it's empty.. here's the code am using: $...
0
votes
1answer
19 views

Get outgoing email settings for current web application via REST or CSOM?

I am working on a SP2013 workflow custom code activity to allow sending an email with attachments, where the email attachments are the SharePoint attachments of the current list item. I got some proof-...
1
vote
0answers
70 views

Getting ClientContext in SharePoint CSOM

I am developing several Azure Functions using the CSOM API for SharePoint. The main functionality is creating PDF's for various purposes and uploading these to SharePoint with CSOM. I have followed ...
0
votes
1answer
14 views

How to use CSOM, SOAP or Rest API to detect anonymous views of list items for a List?

Let's say I have a SharePoint site with anonymous view enabled for the entire website But I have a List that breaks role inheritance. How do I use CSOM, Rest API or SOAP API to detect if a List has ...
0
votes
1answer
86 views

PnP with .NET Core

I can see CSOM now supports .NET core. I just tried making a small sample Azure Function App but it fails with: "Could not load type 'System.Web.Configuration.WebConfigurationManager' from ...
0
votes
0answers
14 views

How to refresh AccessToken For CSOM .ClientContext

I am writing custom Migration programs from 2013 Server Object model to SCOM ClientContext in M365 using AccessToken obtained with a certificate. My problem is that The 2013 libraries have a lot of ...
0
votes
2answers
26 views

Check if a given modern team site has a connected group or not

Is it possible through CSOM to check if given site has a connected group or not?
0
votes
2answers
38 views

Fast site creation with CSOM

I am working on a small api that creates site collections in SharePoint 2019. Since SharePoint 2016, fast site creation feature is available with "New-SPSite" command in PowerShell (-...
0
votes
1answer
41 views

How to get folder by url (“Copy link” button)

I have link to SharePoint online folder like: https://domain/:x:/s/Site1/EcEHhjfer8tBhw84D4iadQUBdCcX_MGw-EpH_lQwXUPJjw?e=pBgWZS How can I get the folder using CSOM? I need to be able to read the list ...
0
votes
2answers
40 views

How to add records to a SharePoint list using Rest API / JSON and HTML

I have been doing a lot of research and reading and I am still having trouble understanding how to accomplish my goal. For reference I have been here reading: Get to know the SharePoint REST service I ...
0
votes
1answer
37 views

In C# with CSOM, How can I copy a file from a known location to a known Folder?

I have one function which uses SearchExecutor finds to find the path of a specified file, which returns a string like. https://example.sharepoint.com/sites/DevelopementTestingSite/Shared Documents/...
0
votes
1answer
57 views

Is there a property that indicates a ListItem has been shared?

I need to extract sharing information for list items, I'm currently doing this with ObjectSharingInformation.GetObjectSharingInformation using the securableObject overload and passing the list item. ...
0
votes
1answer
73 views

SharePoint 5000 List View Threshold Limit Issue in CSOM

I have an issue with Sharepoint CSOM when I am trying to get subfolder with the following code public void LoadFolders(Folder folder, SharePointFolder sharePointFolder) { Context.Load(folder.Folders)...
1
vote
2answers
75 views

Add AD Groups to Sharepoint Online Group using CSOM

I have the following situation: AD: Users Groups Sharepoint: Groups The hole point is to add both the users and the groups from AD to Sharepoint. I got adding the users to work using the following ...
0
votes
1answer
55 views

How to create modern page in SharePoint online using CSOM Powershell

I want to create modern page in a modern site using CSOM PowerShell instead of PNP. After creating that I need to configure list and Events we part in that. Please guide me on this. Thanks in advance!
0
votes
1answer
43 views

How to disable SharePoint 2013 alerts using CSOM

Using CSOM, I am able to retrieve the collection of alerts for a SharePoint Online site and disable each alert using the following code: context.Load(context.Web.Alerts, collection => ...
0
votes
1answer
17 views

Why don't SharePoint's list apis encode serverRelativeUrls?

When calling SharePoint list api's whether it be CSOM, Rest and Soap apis, they all refer to server relative urls without escaping for URLs. When you are using the apis, inevitably you want the ...
0
votes
0answers
12 views

PWA - ProjectContext - 401 Unauthorized Error

We just wanted to provide all tasks to qlikview but there is a small problem with authentication. We are using CSOM to fetch all tasks from PWA. It fetches all tasks properly when debugging but when ...
0
votes
1answer
34 views

RegionalSettings.TimeZone.UTCToLocalTime will always return 01/01/0001 00:00:00

I have the following CSOM code inside my C# console application:- var regionalSettings = context.Web.RegionalSettings; var localDueDate = regionalSettings.TimeZone.UTCToLocalTime(itemversion.Created)....
0
votes
1answer
26 views

Upload an app to app catalog from a sharepoint location

I have a provisioning script which is run as a web job where i need to create a site collection app catalog and then add an app to it. I am storing information about the site in a sharepoint library ...
0
votes
2answers
48 views

Inside my CSOM code how to convert UTC date time into date time as per the regional settings for the site collection

I have the following code to get the Created date time for a list item:- ((DateTime)item.Created).ToString("dd MMMM yyyy HH:mm:ss") + " )" now the date time i will get will be in ...
0
votes
1answer
112 views

Correct way of Convert Enhanced Rich Text field to Plain Text (multiline) - Sharepoint 2013

I changed a type of a Enhanced Rich Text column to Plain Text field. I am seeing similar to the following content in the text field now. <div class="...
0
votes
0answers
24 views

SPO security trimmed search results in a web application

Wondering if you can help, I have scoured the internet and can't find anyone with the same issue. Looking for a way for a user to login to the web application (completely internal) using their O365 ...
0
votes
0answers
26 views

Azure Function Updating user profile using SharePoint Online and CSOM .NET Standard gives access denied

I have Azure Function v3 and I want to update Sharepoint user profile properties with CSOM and .NET standard 2.0 by using global admin account credentials. Reading is working. I can change other users'...
0
votes
1answer
31 views

How to get Sharepoint user group ,permission level, created , Created by ,Modified, Modified by using CSOM

I need to get the User group details. GroupName, Permissions levels, Created by Created date, Modified by , Modified Date. I am able to get the Group Name and Permission Levels. How to get the Created ...
0
votes
0answers
24 views

Cannot upload file via CSOM to SharePoint 365

We have CSOM code to upload a file to sharepoint and it always worked great but we've just encountered a problem that we cannot resolve. For some reason, we keep getting a "access denied" as ...
0
votes
1answer
27 views

Do i need to Issue ListItem.Update(), when i am executing these commands ( ListItem.ResetRoleInheritance() + ListItem.RoleAssignments.Add() )

I am working on a remote event receiver inside SharePoint online custom list. now inside the RER i am getting the item been updated, then reset its role inheritance + add users to the item permission, ...
0
votes
1answer
344 views

Modern Authentication, do we need to change something in C# CSOM?

I heard that MS will use only "modern authentication" later. We have some apps on our servers that connect to SharePoint Online and use CSOM. Will this code-snippet continue to work, or we ...

1
2 3 4 5
37