Newest 'csom' Questions - Stack Overflow

Questions tagged [csom]

CSOM (Client Side Object Model) is a web services-based API of SharePoint allowing easy remote access to data and SharePoint's functions.

1
vote
0answers
11 views

How to fix CSOM Error: The type of data at position X is different than the one expected?

Im trying to get the resource's StatusAssginments using CSOM, including the field History, but it keeps giving me the following exception: An exception of type 'System.InvalidOperationException' ...
0
votes
0answers
6 views

How to add non-project line in timesheet using CSOM

I am working on project server and I have to add non-project line like vacation,sick or any other administrative tasks which are not a part of the assignment for a user. I am using CSOM to perform ...
0
votes
1answer
12 views

Getting all site collections with csom does not work when created with new office admin portal

I can retrive all site collection information with the following code: Tenant tenant = new Tenant(ctx); props = tenant.GetSiteProperties(0, true); ctx.Load(props); ctx.ExecuteQuery(); foreach (...
0
votes
1answer
27 views

Method “StartUpload” does not exist

I am trying to upload a large file (3 GB) from code, I have shrepoint server on a network without internet. I follwowed this toturial, I dowloaded from NuGet the package "Microsoft.SharePointOnline....
0
votes
0answers
10 views

How to read many fields from Project Server?

I'm looking for a way to read many fields from project server. The tricky point is as I have to read some custom Fields, I'm pretty lost, I have all the fields I want to read in a SharePoint List, I ...
0
votes
0answers
47 views

Generic way to read all documents types programmatically

I am using the code below to read content of files from SharePoint 2019 On premise server. This code only work for word document though, Is there a generic code that will allow me to read other ...
0
votes
0answers
7 views

Clientcontext is always null in azure hosted Provider hosted app

I am working on provider hosted app to be hosted on azure. I need to create remote event recevier, I am using https://blogs.msdn.microsoft.com/kaevans/2014/02/26/attaching-remote-event-receivers-to-...
0
votes
1answer
37 views

Reading file from SharePoint not returning correct value

I am using the below code to read a file from sharepoint 2019 and the return values are not string. Example of return values: 0\0\0(\u0001\0\0\u001e\0\0\0\0\0\0 using (ClientContext clientContext = ...
0
votes
1answer
36 views

How to share a SharePoint folder with an external user without requiring a Microsoft account

TL;DR: How can I programatically share a SharePoint online folder with an external user such that the user only requires an access code and doesn't require a Microsoft account. Full version: I'm ...
0
votes
1answer
26 views

How can I get SharePoint server datetime using CSOM model?

I'm creating a service that will notify people about new tasks in SharePoint. For this I have to somehow get it's server datetime due to a huge desynchronisation gaps in time value when comparing it ...
0
votes
1answer
23 views

Csom Project Online documentation

I'd like to build an application for Project Online by using CSOM but I'm not able to find the documentation about project online CSOM Have you a link where I could find this documentation? I found ...
-1
votes
1answer
23 views

Set Default Content Type Using CSOM Not Working

I have created new content type in CSOM, i need to set the newly created content type as default content type for the custom created sharepoint list. I am using below code. List aeList = ctx.Web....
0
votes
0answers
10 views

Can not find all the records

I would like to know why PWA returns different records in the tasks assigned by Csom and RestApi, we consulted the assignments of a resource by RestApi https://{test}.sharepoint.com/sites/pwa/_api/...
0
votes
0answers
28 views

CSOM CreateSPAsyncReadJob stays in Queue state

I am referring to the Migration Asynchronous Read API that allows creating a read job on SharePoint using CSOM. I am able to create the read job successfully but unfortunately, the job stays in a ...
0
votes
0answers
20 views

Update Task Project using CSOM

I'm trying to update a task in microsoft project online using CSOM but it's not working always return me a exception ("Unknown Error"). I'm using a example this example: https://github.com/OfficeDev/...
0
votes
0answers
36 views

How to get list of “App Parts” available for a SharePoint page using Javascript

I am trying to get all of the available App Parts for a SharePoint page using Javascript, how would I go about doing this? I have tried to use a LimitedWebPartManager to get all of the apps, but it ...
0
votes
0answers
10 views

Folder copy from source site to target site during Server overload/throttle

My requirement is to copy folders from source site to target site in click of button on target site. The functionality is working as expected on Development/Quality server since server load is very ...
0
votes
1answer
54 views

Using Sharepoint CSOM, how to check for null when retrieving content type by Id

I attempt to locate a content type by id first at the current web level, if not found then i check from the root web. However at the current web if not found I don't know of the right way to check if ...
0
votes
0answers
22 views

Get User Token from Sharepoint and redirect to another webpage, which will use the token

Our asp.net based users also have access to sharepoint. What we want is they should get authenticated to sharepoint and then get redirected to our website. In this way our website will get users ...
0
votes
0answers
38 views

Attach Workflow-Association to Site Content Type

I am adding a site content type to a sub web and attach this content type to a document library. I attach a WorkflowAssociation based on default WorkFlow-Template "Collect Feedback - SharePoint 2010". ...
0
votes
0answers
22 views

ViewPath query parameter in SharePoint list causes CSOM to fail Lists.GetById

It seems due to a recent SharePoint Online update that their lists (when selected using the left navigation) now adds a ViewPath query parameter by default. With this change, it seems like the ...
0
votes
2answers
32 views

How to get group owner by CSOM

I am working with Sharepoint Online and CSOM and I need to get the owner of a specific group. I tried to load data from ClientContext, and got a exception with the message "unknown error". Here ...
0
votes
0answers
20 views

I am writing a code to upload a document to a specific folder in sharepoint document library using web api

I am creating a web api to upload the document in a specific folder in a sharepoint document library. I know how to it using csom in a console application. The dlls which I am using in web api for ...
0
votes
0answers
73 views

Sharepoint CSOM version conflict

Currently im trying to make sense of what causes the following lines to produce version conflict. Ive done my research but a lot of my search seems to be pointing to cache issue. But i would like to ...
0
votes
2answers
35 views

How to delete SharePoint Site Collection using pnp csom programmatically

I have a requirement on SharePoint Online Office 365. As per my requirement, I have to delete all the Site Collection from SharePoint Online Office 365 Admin Center using pnp csom programmatically. ...
1
vote
0answers
31 views

SharePoint Online Throttling

We are creating a custom solution using SharePoint CSOM. There are some cases where we need to store ~400 list items containing Attachments, with a total size of about 400 MB. We are uploading them ...
0
votes
2answers
41 views

How to create a page using CSOM Javascript in sharepoint..?

I would like to create a page using csom javascript code in sharepoint site with in the 'Page' library. The scenario is like, The javascript csom code creats page with all attributes and page data ...
0
votes
0answers
51 views

Caml Query RowFilter doesn't work with WHERE conditions - List view threshold

I have some troubles with CAML Query on a 8000+ List on Sharepoint. I want to paginate the query in order to avoid this issue. I used this c# code: List spList = clientContext.Web.Lists.GetByTitle(...
0
votes
1answer
144 views

How to upload (multiple) files to SharePoint Online using CSOM?

I have a Web Form that uploads some inputted data to a SharePoint list as a new list item which works well. I tried to add a new code to upload two files via two separate <asp:FileUpload> ...
1
vote
1answer
40 views

Sharepoint development using PowerShell

I'm trying to create sharepoint webparts using powershell. But each time I loads (Context.Load()) something, I'm getting errors. Here is my code. [Reflection.Assembly]::LoadFile(([System.Reflection....
4
votes
1answer
160 views

Powershell CSOM Mutli-Choice Checkbox

I've reached the end of the internet on this. Many variations of this resource technet set_and_get_a_multi-choice_field Im running O365 Sharepoint and I have a multi-checkbox list or multi-select ...
1
vote
0answers
50 views

How to get the ProjectContext after acquiring a Sharepoint ClientContext through multi factor authentication?

I would like to interact with Project Onine through CSOM/C#, for a client which has MFA enabled. With the snippet below I can get through the sharepoint MFA I think (the debugger progresses past those ...
0
votes
0answers
11 views

How to display SP Online Document Library items in Grid View and Download the document using CSOM

In SharePoint Provided Hosted App , I want to display SharePoint online document library documents with Meta data in Gridview .On click on this document name in the gridview i want to download the ...
0
votes
0answers
32 views

Error on upload file to SharePoint online tenant using CSOM client in client web api application in .net framework 4.7.1

When i try to upload file using bearer token valid to communicate with my SharePoint tenant i recieve this error : The URL is invalid. It may refer to a nonexistent file or folder, or refer to a ...
0
votes
2answers
54 views

Is HTTP PUT access required for uploading to SharePoint via the SaveBinaryDirect method?

We have developed a .NET console application to do file uploading to a SharePoint 2016 document library. The application was built using the Microsoft.SharePoint2016.CSOM library, with file ...
0
votes
1answer
141 views

Problem authenticating with SharePoint Online when using GetWebLoginClientContext

We've got an ASP.NET MVC web application running on Azure on which we want to expose search results from a SharePoint Online tenant. Users in the web app are authenticated on Azure AD, and we want to ...
0
votes
0answers
27 views

LoadQuery Where clause part of name

I am working on an project online c# app. Atm I get the project context via LoadQuery My question is, is there a possibility in the where clause to use some kind of "contains" IEnumerable<csom....
0
votes
0answers
11 views

Get top 5 search queries using CSOM or JSOM in SharePoint Online

I know we can get the excel report under popularity and search reports in site settings but I want to display the top 5 search queries in a webpart on a sharepoint online classic page. Is there a way ...
0
votes
0answers
20 views

SharePoint - CSOM Validations - Getting View Columns

I have a loop which lists the through sites and then the document libraries and performs certain validations in CSOM. One of things requested was to add a CheckedOutUser to all libraries. I ...
1
vote
0answers
41 views

BizTalk 2016 SharePoint Adapter - Force Use of Port 443

I'm trying to integrate a BizTalk 2016 FP3 application with a SharePoint 2013 site that is available only over port 443 / https. I would like to use a dynamic send port, the new(ish) adapter and the ...
0
votes
0answers
19 views

Should I use one or multiple ClientContext to update a very large List?

I need to update a large SharePoint List, about 10,000 items or more. Each ListItem has 4 columns to be updated. I don't know what the best approach for this scenario is: Use 1 ClientContext, fetch ...
1
vote
1answer
62 views

How to logout from Sharepoint with CSOM

I am using CSOM library with C# to upload some files to SharePoint. One requirement is to use 2FA. Basically, I am following this post: https://knowledge-junction.com/2017/12/24/office-365-connecting-...
0
votes
1answer
255 views

Get SharePoint List in batches c# CSOM

Can you help me getting the items of a SharePoint library (it is a library with document sets) using CSOM. The library has a lot more than 5000 items and I know SharePoint has a limit of 5000, so I am ...
1
vote
1answer
70 views

How to get Value of a custom field task in CSOM Project Server

I am working on a console application for project server. Atm I can read the name and work percent of each task assined to the project. Each task has a custom field with an unique id. It looks like ...
0
votes
0answers
41 views

Sharepoint CSOM with Parallel.Foreach in C#

I am working on a WPF application which needs some resources to be downloaded from Sharepoint and keeps checking for an update in any resource at every restart. For this I used CSOM but the problem ...
0
votes
0answers
13 views

Store large amount of data in Session

I am developing a web in .net that uses some Sharepoint data. There is no problem on it except for a specific list. This list can have a lot of records (> 5000) and is used in all webforms as a ...
0
votes
1answer
43 views

CSOM can't get past SP is undefined

I've checked this site and others and found answers that I have tried but must be missing the correct one. First venture into CSOM as I usually do this sort of thing with C# server side. As you can ...
1
vote
1answer
46 views

Authorization problem with SharePoint ClientContext created with ADAL Access Token

I am trying to automatize the provision of a SharePoint Online Site Collection. I am doing it with SharePoint CSOM. If I create the ClientContext(Microsoft.SharePoint.Client) object with ...
0
votes
1answer
86 views

CSOM C# connect with Project Server

I already ask a similar question and I thought I was making progress. Well turns out I am hard stuck atm. I am trying to connect to a Project Online Server but I can't. string pwaPath = "...
1
vote
0answers
53 views

Create Folder and Share with Guest User without Microsoft Account in Sharepoint with CSOM

I am quite new in CSOM/Sharepoint development and have an interesting task to solve. Unfortunately I don't make as much progress with some details as I would like. A customer of mine wants a secure ...