Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [client-object-model]

API for interacting with SharePoint from .NET, Silverlight, and JavaScript.

1
vote
1answer
343 views

Get Web Author in Client Object Model

Server API provides SPWeb.Author property to access the creator of the site. However, managed client object model Web API doesn't seem to provide any such property. What is the alternative to get the ...
0
votes
1answer
688 views

Creating list item from outlook mail

I have a requirement where I have to update list item in a list fetching values from an e-mail. I have to create a button in the outlook ribbon, clicking on which the values (in key-value pair) should ...
2
votes
1answer
2k views

First time connecting to SharePoint Server 2013 from Console

This code is supposed to be the simplest code for connecting. Like a "Hello World" program: static void Main(string[] args) { var targetSite = new Uri("http://w2k12spps02/sitios/...
0
votes
2answers
200 views

SharePoint 2013 HomePage customization

I am looking to hear development options for below requirement. I need to create Homepage for the company as shown in the image. The Body of the page contains various images with there hyper links ...
0
votes
1answer
174 views

find out what item id failed executeQueryAsync item creation

How can i find what item failed executeQueryAsync add item method ? this is my code : var itemArray = []; var siteUrl = "http://MySite/MM/cm"; var clientContext = SP.ClientContext.get_current(); ...
1
vote
1answer
1k views

How i can disable a column from the lists' Quick Edit Grid using a JSlink which is linked to list view webpart

I want to disable the Title column from the Quick Edit grid, inside certain web-parts so i did the following steps:- 1- I went to a list view. 2- Edit the page 3- Edit the web part. 4- Under the "...
1
vote
1answer
674 views

Get expanded recurrence using CSOM or at least filter future items on Lists.asmx

I need to get all events in a calendar, including series (with expanded recurrence), then I saw that I'm able to get this data using the Lists.asmx web service and CAML query from this link: https://...
0
votes
1answer
1k views

How to pass user's identity to Client Object Model when using ASP.net?

How can I pass an authenticated user's identity through the Client-Object Model? SP 2010, Client Object Model code is on an IIS server. I want to pass the already authenticated Windows user to ...
2
votes
0answers
462 views

could not access library via CSOM/REST API if end user only has permission on the library but not the web level

This is on SharePoint Online and here are the env setup: Site collection: https://xxx.sharepoint.com/sites/sitecollection1 - End user has Permission Subsite: https://xxx.sharepoint.com/sites/...
4
votes
3answers
242 views

Cannot Query Document Library with > 5K folders

I have some SP .NET Object library code that will allow me to query for the contents of a specific folder in a document library. It worked fine in a UAT environment where there were only a few dozen ...
2
votes
1answer
870 views

How to Display Items Count Inside each sub folder inside a document library SharePoint Online

want to Display Items Count Inside each subfolder inside a document library SharePoint Online. using below code am getting all the folder items with count. using console application c# ...
0
votes
2answers
984 views

from list item object how to check is it a folder or not ? Using SharePoint Client Object Model C#

Have List item Obj. how to display it's item if it is a folder. using SharePoint Client Object Mode. here my code using (ClientContext ClientContext = new ClientContext(requestUrl)) ...
1
vote
0answers
205 views

CSOM Check Anonymous Access

I'm trying to write some C# CSOM code that creates a report of what websites can be accessed anonymously. In PowerShell, I would get this info with something like $webUrl | Get-SPWeb | % { $_....
2
votes
2answers
2k views

'System.Net.WebException' occurred in Microsoft.SharePoint.Client.dll

While running Sharepoint Client Side Scripting in Visual Studio getting error at the end of ExecuteQuery() It throws an unhandled exception of type 'System.Net.WebException' occurred in ...
0
votes
2answers
3k views

Retrieve all the Document Library with folder and file count using SharePoint Client Object Model

Hi Friends i have a SharePoint site having more Document Library's i just want to display this as a Console application using SharePoint Client Object Model. thanks in advance
0
votes
1answer
1k views

Update editor of published version without affecting version number - CSOM

I am trying to copy files from one site collection to another including their version history and preserve the metadata using CSOM. I am almost there using the below logic for each version of the file....
3
votes
3answers
3k views

How to use the FedAuth cookie in 'ClientContext'

We have to access a SharePoint site using FedAuth. We have the code which gets us the FedAuth cookie. What we are unable to get is how we would be using this FedAuth cookie in our ClientContext object....
1
vote
1answer
1k views

Alternative to using (Event Receivers & Server-side object model) when working with Office 365 sharepoint

I have being working with on-premise sharepoint 2013. and a lot of functionalities i have been doing were implemented inside Event Receivers when item added/updated. Where inside Visual Studio 2012 ...
0
votes
1answer
362 views

Office365 app page doesn't have __REQUESTDIGEST

My app page doesn't have __REQUESTDIGEST on page elements. How do I get this value from sharepoint API ? I used this codes but return 403 Forbidden error var formDigest; $.ajax({ url: ...
1
vote
1answer
507 views

How to call Sharepoint 2013 API by Javascript in Farm Solution

I am developing a Farm Solution (full trust) with some custom WebParts. For one WebPart i want some ajax behaviour, so i thought: Why not use the JSOM API? My web part just want to retrieve the new ...
1
vote
2answers
747 views

JSOM Error in SharePoint Client Code When Retrieving User Object

Trying to figure out why I am getting this error with my code, am I missing a script reference, or is perhaps something wrong with the Context data grab section? Error: The property or field 'Email' ...
3
votes
4answers
19k views

Get User object from Person or Group field value using JSOM/JavaScript API

How do you get a User object from Person or Group field value using JSOM/JavaScript API? I am looking for something like this (See Vadim Gremyachev answer), but let me be clear I DO NOT WANT the ...
0
votes
1answer
586 views

Problems while checking if file is locked by user

I wrote a program that opens and modifies documents in a library. I tried to set it up in a way where the program would skip documents that are opened, locked or checked-out by a user. But apparently ...
0
votes
1answer
912 views

The property or field has not been initialized. Error throw in sharepoint online?

I have big problem. I tried a lot of solution for this issue but not worked. I need help. Here is my code. I try to get items from picture library. It's an app for sharepoint online. var context; var ...
1
vote
2answers
275 views

How to move / copy documents from one SharePoint library to another SharePoint library on different farms Using Event Receiver?

We have requirement to move /copy documents from one site to another, sites are on different farms( totally different environment). We can can copy items if library in same application/ site ...
0
votes
1answer
913 views

How to get ID field in form through internal name in SharePoint

I'm learning Sharepoint 2013 . I have a new form to add data . In that form i have a web part add javascript . In that script i want add code custom this form and i want get ID through internal name ...
0
votes
1answer
333 views

SP.Utilities.UrlBuilder.urlCombine Not working

I am trying to concat two strings using urlCombine method like this: SP.Utilities.UrlBuilder.urlCombine(_spPageContextInfo.webAbsoluteUrl, AnotherUrl); The AnotherUrl might contain a slash / and ...
1
vote
0answers
18 views

remove check out check in and download functionality completely from site collection

Please help how to remove check out, check in and download functionality from the site collection so that it is not available for subsites too. I don't have control over server hence I need to achieve ...
6
votes
1answer
254 views

what happens with items/lists when the creating user is deleted?

I have a user usr1 that i need to remove completely from a site collection. usr1 has created several lists and items within these lists. If i remove the user programmatically: ClientContext.Web....
3
votes
2answers
71 views

CSOM Error 409 because Slide is opend by another user

I am getting an error 409 while trying to write a file in a slide library. All I found on google until now is about wrong paths. But I already wrote about 90 other files in the exact same library ...
4
votes
1answer
152 views

Copying Selected List Items From One Custom List To Another

As the title says, I'm trying to get items from a list that are selected by the user to copy over into another list, "Shopping Cart". During the copy, I would also like to add a username field to each ...
0
votes
1answer
385 views

Connecting to SharePoint Online from on-prem SharePoint with current user

I have setup the cloud hybrid search between my on-prem SP2016 and SPO (SharePoint Online). I have azure ad synchronized with my ad etc. (without SSO). sample scenario: I am displaying results from ...
1
vote
2answers
440 views

How to display a string in client browser console using c#?

Let's assume I have a C# file in my SP2010 application and I want to display a message in the browser console. using System; using System.Collections.Generic; ... public class WhatEver{ // some ...
3
votes
2answers
122 views

How to Check Out Document Remotely

I am trying to check out a file remotely using the Sharepoint libraries: using Microsoft.SharePoint.Client; public void CheckOutFile() { // Set the context (URL) of the site var cc = new ...
2
votes
1answer
2k views

Sharepoint 2013 C# Add recurring event, Shows in calender view but is not there

From C# codebehind I added a recurring event SPList olist = web.Lists[appname]; SPListItem item = olist.AddItem(); item["EventDate"] = startdate;// 9/5/2016 8:00:00 PM // System.DateTime item["...
3
votes
1answer
2k views

CSOM The request uses too many resources error while provisioning web

I am provisioning web on SharePoint online using following CSOM code(provided hosted app), but intermediately we are getting "The request uses too many resources" error. using (ClientContext ...
0
votes
1answer
58 views

Is it possible to transfer authorized Windows's user credentials to SharePoint?

I have a console application that connects to the SharePoint and works with lists (I'm using SharePoint Client model). Code that connects with SharePoint is: SPCli.ClientContext _clientContext = new ...
0
votes
1answer
427 views

Upload a document into a SharePoint library with IRM

I'm trying to upload a file into a SharePoint document library using the C# CSOM library. The document library I'm uploading into has information rights management settings enforced. When I try to ...
1
vote
1answer
746 views

Which dll client version should I use to connect to both Sharepoint 2010 and Sharepoint 2013?

I have a web project that should consume both On-premise Sharepoint 2010 and Sharepoint 2013. So, we have two different versions of the following dlls : Microsoft.SharePoint.Client V 14.0.0.0 ...
0
votes
0answers
24 views

SharePoint Online provided hosted ribbon app running twice

I have a SharePoint Online provided hosted ribbon app (in Azure), the app perform query the document properties and check out the document, the problem is when the document process for 50 documents or ...
3
votes
1answer
3k views

Sharepoint client object model {File not found}

var onlineCredentials = new SharePointOnlineCredentials(ServiceUserName,securePassword); var context = new ClientContext(clientUrl); context.Credentials = onlineCredentials; ar cc = GetAllFiles(...
1
vote
3answers
1k views

Creating a sub-folder in a SharePoint with Client.dll in C#

I am trying to create a list of all the folders that exist within the root folder. From there I want to implement the creation of a folder if the folder does not already exist. Is there a way to ...
1
vote
2answers
680 views

Group permission - Sharepoint Online Powershell

I would like to have a report of which sites a specific group or user has on all the SharePoint sites. I have this group called SPGroup and I want to see on which sites this group has permissions on, ...
1
vote
2answers
2k views

How to get the return value from SP.SOD.executeFunc?

I have the same scenario as what this below question has: How to get the return value of an on demand executed function? I have SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getPageTitle); ...
3
votes
2answers
991 views

Can we create List in another site collection using CSOM?

I have a very simple scenario. I am using SharePoint Online I have 2 site collections SC1 and SC2. Now i am executing a JavaScript function in SC1 and am trying to create a list in SC2 in a sub-site ...
2
votes
1answer
39 views

Add Site Name to column in NewEdit Form using Client object model

I've been able to Get the site name (adding this to editform via CEWP) but I don't know how to modify the script to be able to update the field ProjectName with the Site Name. Any ideas? Thanks so ...
1
vote
2answers
3k views

Detailed version history for a specific version label

How to perform 'View' operation for fetching all metadata values of the specific version using SharePoint client object model, for instance here version 7.1 I am working for Provider hosted app [...
2
votes
0answers
196 views

How to get lookup field in Search REST API? [duplicate]

How to retrieve the lookupId or lookupvalue in Search REST API results with other fields. http://server/_api/search/query?querytext='sharepoint'&selectproperties='Title,Age'
1
vote
2answers
1k views

Is there any way to overcome URL length limitation in REST API “GET” Requests?

Is there any way to overcome the 2083 characters limit using REST API GET request itself.
3
votes
2answers
185 views

Update vti_ property

I use CSOM and I'm trying to find a way how to change vti_contenttypeorder property for a list item. Does anyone know some workaround how I can to do this?