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.

CSOM, which stands for Client-Side Object Model, is a web services-based API of SharePoint. It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.

Both JavaScript and .NET bindings to CSOM exist. Software leveraging CSOM can integrate with SharePoint without the need to run within a SharePoint farm.

In SharePoint 2013 CSOM is the only API available to software built using the new Apps for SharePoint architecture. Apps for SharePoint run side-by-side, typically in the cloud, and integrate with both cloud and on-premise SharePoint farms.

Corresponding MSDN documentation is located here, with separate JavaScript and .NET API references. The web services-based API underlying CSOM has been documented as part of Microsoft's Open Specifications initiative.

941 questions
4
votes
1 answer

How to add a Web Part into a SitePages/Home.aspx using CSOM

has anyone managed to add a Web Part into a Wiki page using CSOM? Background: Home.aspx is a Wiki page and all its WPs are located in the rich text zone (in fact a "WikiField" column). Technically they are located in a hidden "wpz" web part zone and…
Jan Lenoch
  • 79
  • 2
  • 8
4
votes
1 answer

No 'Access-Control-Allow-Origin' header

I have an MVC application deployed to Azure which was created as a SharePoint App Part (Provider-Hosted) for a SharePoint Online site. All Client ID and Secret ID are set correctly within SharePoint site and the Azure web Application. The App does…
user1333524
  • 463
  • 5
  • 17
4
votes
1 answer

Sharepoint Online / Excel Services / Delegated authentification

We have an asp.net MVC application where users connect through azure active directory. They can manage files through their sharepoint online accounts. To access sharepoint online, we use CSOM.We want the user connected to azure active directory use…
4
votes
1 answer

Installing Sharepoint App with CSOM

Does anyone know if it is possible to automatically install particular App on sharepoint site using CSOM? We have mechanism that creates new site on sharepoint, and what we need is to automate process of installing particular Sharepoint App on each…
Konrad Z.
  • 1,592
  • 4
  • 20
  • 34
4
votes
1 answer

Change permissions of a SharePoint list using JavaScript

I have an app that creates a list. I'd like the app to also set the list permissions to only allow admins to make changes to the list. I know how to hide the list, but I understand that this will not prevent clever users from typing in the URL of…
Ectropy
  • 1,533
  • 4
  • 20
  • 37
4
votes
2 answers

SharePoint CSOM, retrieving site collections. Limited to 300?

I am trying to retrieve the site collections list from a SharePoint Online domain. I am using C# and client object model. The following code returns only 300 site collections. var tenant = new Tenant(ctx); spp = tenant.GetSiteProperties(0,…
Sylvain Gantois
  • 779
  • 1
  • 12
  • 28
4
votes
1 answer

Sharepoint field has not been initialized in C#

I'm writing a code that will go through every list item in a sharepoint list and look for an empty field. If an empty field is found, the person responsible for the list item is notified by email. I'm getting an error at the line val =…
user3158291
  • 55
  • 1
  • 1
  • 4
4
votes
1 answer

Where is a SiteLogoUrl in CSOM?

I found SPWeb.SiteLogoUrl and expected this property in CSOM and REST. But I didn't find it. How can I get a SiteLogoUrl using CSOM or REST? SP.js Microsoft.SharePoint.Client.dll
Warlock
  • 7,321
  • 10
  • 55
  • 75
4
votes
1 answer

Sharepoint 2013: Inserting image on page javascript csom

I create a new page with javascript csom. I am able to give it a title, byline, content etc., but it won't accept an image reference. It doesn't give me any error messages, nor reaching my error function, but I'm obviously missing something here as…
4
votes
2 answers

How to retrieve sites of a specific type using CSOM?

I'm making an application which connects to SharePoint 2013. I'm using CSOM to work with SharePoint. I want to display the newsfeed of site (Team Site) which the current user follows. To get the newsfeed, I implement the following step: First, I…
4
votes
2 answers

Setting Search Center URL in SharePoint 2013 using Javascript CSOM

In SharePoint 2013, I am trying to access Search object through JavaScript CSOM. I want to know the object which can give me the access to Search Settings under Site Settings. I tried looking under SP object but I didn't find any Search related…
nks
  • 161
  • 8
3
votes
1 answer

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. var site = new Uri("https://domain-admin.sharepoint.com"); …
3
votes
1 answer

Error when setting a value to Multivalue Managed metadata field type using SharePoint REST API

I have two managed metadata fields in my list, they both can have multiple values, the first one is 'mm' and the second one has a danish symbol Ø - 'mm_Ø'. I fetch the fields information using SharePoint REST API endpoint: GET…
3
votes
0 answers

Copying or moving files around in SharePoint Online

I see so many people struggling to copy or moving files around in SharePoint online, that I decided to write a small demo console app to show how to do it. We will be using the CreateCopyJobs method, available on CSOM to copy a folder from one site…
Pedro Soares
  • 1,117
  • 12
  • 14
3
votes
2 answers

Microsoft.SharePoint.Client.IdcrlException: 'The sign-in name or password---' Even WITH Pnp Authentication Manager

I have signed up for the Office 365 Developer Edition with Microsoft 365 E5 Developer (without Windows and Audio Conferencing). I am writing codes to connect to the Sharepoint of developer domain. Following are my codes: public static String…
user7808679
  • 119
  • 2
  • 11