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.

learn more… | top users | synonyms

0
votes
0answers
11 views

File not found error when uploading file using CSOM

I am using following code to upload file at the following location but getting File Not Found error at last line "clientcontext.ExecuteQuery();" using (ClientContext clientcontext = new ...
0
votes
0answers
14 views

Modifying Global Navigation Settings in SharePoint Online

I am working on a PowerShell script to provision a site collection with a predefined hierarchy. Since the PowerShell breadth is so limited, most of this is done via functions that are CSOM code. As ...
0
votes
0answers
11 views

Add new webpart property to webpart xml in Sharepoint 2013

Currently I'm trying to use This answer to add a web part with XML through CSOM. But i need to define a new webpart property called "DataSiteURL" (String) for my webpart. Is it possible to change the ...
0
votes
1answer
22 views

Sharepoint Code to break inheritance and add new permissions at custom list level

I have a site collection with permissions set up as: EVERYONE READ I have a custom list. Here, I want to add permissions as EVERYONE CONTRIBUTE. I want to remove the Everyone Read Access Permssions ...
0
votes
0answers
19 views

Hiding a web part programatically using CSOM

I have gone through this article in MSDN: https://msdn.microsoft.com/en-us/library/office/ee539301(v=office.14).aspx There is no example mentioned to hide a webpart. I am trying to programatically ...
0
votes
0answers
6 views

CSOM Powershell get the files of a specific folder in a document library [duplicate]

I am wanting to get the list of files that are in a specific folder in that document library using powershell CSOM Tried this but it didnt work saying it didnt recognise getfolder $folder = ...
0
votes
2answers
57 views

List files in a specific folder in a document library

I there anyway to output the files of a specific folder in a document library? Listing them will be like foreach $file in $folder.files { write-host $file.name } But how do I tell it to look ...
0
votes
0answers
12 views

How to Check if a Sharepoint user is in a security group no matter if this is in a AD group CSOM Javacript

I have a Sharepoint hosted app and I need to check if the current user is in a sharepoint security group no matter if this is in a AD inside the group, the following code check if the user is in the ...
0
votes
1answer
26 views

SP 2010 CSOM Javascript: Intermittent Failure

I have inherited some JS code that is playing up. It looks something like this: ExecuteOrDelayUntilScriptLoaded(MyFunc, "sp.js") function MyFunc() { var ctx = new ...
0
votes
1answer
20 views

SP2013 CSOM : Create a folder in sharepoint list 2013

I am using below code to create a folder in sharepoint custom list but the folders are created with name "No Title".WHere is the code going wrong or i miss any attributes ? ...
0
votes
0answers
18 views

Why user is able to connect to to site using CSOM when he is not authorized

I am using the following code to connect to a site using CSOM in C# application. ClientContext context = new ClientContext("http://myserver"); Web web = context.Web; context.Load(web); ...
0
votes
1answer
22 views

Could not load file or assembly 'Microsoft.SharePoint.Client, Version=16.1.3912.1204,

Previously I was using Microsoft.SharePoint.Client.dll of version 15.0 in my application. I just removed that reference and added new reference of assembly of version 16.1. But now it is giving error: ...
1
vote
0answers
56 views

SharePoint 2013 CSOM where is Folder.MoveTo?

I have to implement a functionality of moving a document folder and was hoping to use Folder.MoveTo; But I don't see it in the Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime for ...
3
votes
4answers
61 views

Compatiblity when using CSOM or SOM

If I want to develop an application in .Net using C# which will perform simple operations such as: Connect to a site using user/password Retrieve document libraries Upload file in document ...
0
votes
0answers
12 views

check if a sharepoint site and document library is correct

I have a script which adds files to a document library, but before I actually run this script I want to run another script to test if the site and document library are correct. I tried this : ...
1
vote
1answer
24 views

How to update item properties for an existing document found by search with CSOM?

You don't know which library it resides in, nor site, nor site collection. The only entry point is the search center URL or _api/Search endpoint. The problem is that when you retrieve the File it is ...
0
votes
0answers
13 views

Adding file permissions from a file share to the same fileshare in office 365

I have this code that adds the permissions to folders from a fileshare to the same file share in office 365. How can I make it so it add the files permissions as well? Function MapPermissions{ ...
0
votes
0answers
44 views

Office 365 upload a file to a document library powershell

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $pass = ConvertTo-SecureString $credentials.Password -AsPlainText -Force $Creds = New-Object ...
2
votes
1answer
41 views

Is it possible to get “Active Directory” groups and members using client object model in sharepoint2013?

Is it possible to get "Active Directory" groups and members using client object model in sharepoint2013? If any one know please share your ideas. :)
0
votes
1answer
22 views

How to get document extension from a document library in SharePoint 2013 using Client Object Model?

I tried this code to get value : docEnumerator = collVideoLibrary.getEnumerator(); //Looping through the collection while (docEnumerator.moveNext()) { docItem = docEnumerator.get_current(); ...
1
vote
1answer
15 views

Javascript code to write JQGrid data to excelsheet?

I am working on JQGrid, I found one solution but it is writing whole JQGrid on excelsheet. But I only want JQGrid data on excelsheet. My JQGrid data consists of sharepoint list data. So can anybody ...
0
votes
0answers
29 views

How to get “Active Directory” groups in Sharepoint 2013 using “Client Object Model”

I tried this code, but I get only the SharePoint Groups. var groupCollection; function getAllGroups() { var ctx = new SP.ClientContext(); groupCollection = ctx.get_web().get_siteGroups(); ...
0
votes
1answer
18 views

how to get Multiple lines of text values from a document library in sharepoint 2013 using client object model

how to get Multiple lines of text values from a document library in sharepoint 2013 using client object model I tried this code to get value : docEnumerator = ...
0
votes
1answer
18 views

Add Web Part to page “automatically”-Sharepoint foundation 2013

I'm a relative Sharepoint newbie trying something that seems like it should be simple but having lots of trouble executing it. My organization does not have much more sharepoint experience than I do ...
0
votes
1answer
25 views

How to verify feature staus (enabled/disbaled) using client object model in SharePoint online?

I am working on "Retrieving activated features of specific scope". I have written following code. ClientContext context = ContextManager.GetClientContext(cred, siteUrl); Site site = ...
4
votes
1answer
65 views

executeQueryAsync callback with a while loop

I am fairly new to javascript and have spent some time trying to understand callbacks as they relate to SharePoint's CSOM, but have had some issues. Essentially, I am running a query to get a ...
0
votes
1answer
22 views

List Items not getting loaded. AngularJS throwing error on function that is called on executeordelayuntilscriptloaded

AngularJS is showing following error in browser console, Error: [$injector:nomod] Module 'SharePointAngApp' is not available! You either misspelled the module name or forgot to load it. If ...
0
votes
0answers
17 views

How to create Client Context from jquery AJAX Get?

I have an HTTP Post controller that I use in a SharePoint online provider hosted app. The controller code: [HttpPost] public JsonResult FinaliseQuote(string quote) { using ...
0
votes
1answer
25 views

get the rootweb for a office 365 for a site collection

i have a site collection called https://mysitedev.sharepoint.com/sites/migration is there anyway to get the first bit https://mysitedev.sharepoint.com with csom. will i have to do it with regex?
3
votes
1answer
33 views

list all users in an office 365 site powershell csom

How can I list all the users from an office 365 account. I have tried this: $users = $Context.web.SiteUsers; $userinfos = $Context.web.SiteUserInfoList; ...
0
votes
1answer
41 views

CAML query ignoring OrderBy element

I can't seem to return a set of items in the order I want while using a CAML query. I want to grab the newest item in a specific folder, so I want to query the folder, order it by ID (though I'm ...
0
votes
0answers
23 views

Cannot create site template from SharePoint 2013 online using C#

I am facing one strange issue in creating sub site using CSOM. Following steps I have performed. I have created new site collection (Publishing) in sharepoint online Created sub site of type ...
0
votes
1answer
40 views

Load all fields for a specific ListItem using CSOM

I want to load all FieldValues for a specific ListItem ForExample public ListItem GetItemById(List SPList, int id, string[] fieldNames) { using (Ctx) { ...
0
votes
1answer
18 views

Enumerating contents of 'context.load' JS object works but using 'getById' does not work

In my Office 365 App I have a simple functionality where it loads a library and then reads a couple of fields for all items in the library. Below is my sample code: (function () { ...
0
votes
1answer
39 views

Get Guid for “All Users” List

Does anyone know how I can get the Guid or view the below list. The reason I ask is that I need to use the Guid for another lookup field, I need to specify this Guid as the source id. I've tried ...
0
votes
0answers
12 views

CSOM timeout when attaching file to list item

I am attaching files to list items and encounter the following error message: The operation has timed out. Looking at the files that throw this exception, I see that they range in size from ~7MB to ...
0
votes
1answer
12 views

How might I change a publishing site to use Structured Current Navigation instead of Metadata Navigation using C# CSOM?

I have come across many resources regarding how to add pages to navigation and how to change navigation settings but have not yet seen anything on how to go from Metadata Navigation to Structure ...
1
vote
1answer
51 views

check if a user exists in a sharepoint site

Is there anyway to check if a use exists in a office 365 site. I am adding meta data to items in a document library and I am using ensureuser but if the user is not there I don't want it to be added ...
1
vote
0answers
31 views

Get spusercontext like _spPageContextInfo on page load

Is there any way to get the Current user details once the page loads in SharePoint 2013 like we get data for _spPageContextInfo I don't like to call below methods again and again var context = ...
0
votes
0answers
14 views

Shared files not being displayed in “Shared with me” using CSOM

I'm using the following code to share items within OneDrive. private static void Main(string[] args) { using (var ctx = new ...
0
votes
0answers
17 views

Get checked out items that don't have checkedin version (yet)

In a document library, I need to get all the files/items, even the items that don't have yet checked-in versions. Is this possible and how? I'm using CSOM (C#).
3
votes
1answer
58 views

Uploading a large file to Office 365 via CSOM PowerShell

I have the following code : $FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open) $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation ...
1
vote
0answers
36 views

Create a new list from custom template with CSOM in SharePoint Online

I am trying to create a new list from an existing list template using CSOM in a SharePoint Online environment. Here is my code: using (ClientContext ctx = new ClientContext(WebURL)) { ...
0
votes
0answers
21 views

Querying folder's content in OneDrive for Business using CSOM works extremely slow

I try to get a content of specific OneDrive folder using Sharepoint CSOM 2013. The version of Microsoft.Sharepoint.Client.dll assembly is 16.1.3912.1204. Here is my code. I've tried two working ...
0
votes
1answer
25 views

How to read Data from App web and write data to a host web by making REST calls

my Question :How to read/copy Data(images folder) from App web and write/Upload data to a host web (Picture Library) by making REST calls with the cross-domain library. i have Created SharePoint ...
1
vote
1answer
59 views

How to Upload Images to SharePoint Online(Office 365) Picture-library using CSOM (Java Script)?

currently created Picture Library using csom on host Web in my last question, now trying to add some Images to that Library, So for that created Image folder into SharePoint Hosted App. how to achive ...
0
votes
1answer
26 views

Get SharePoint user pictures from mysite

I have written a SharePoint core solution with C# which gets the URLs of user pictures and should download them. The URL I get is correct. The URL structure is like: ...
2
votes
1answer
88 views

How To Create a Picture Library in SharePoint Online(office 365) Using CSOM-JavaScript?

Currently I have created SharePoint Hosted App (Picture Slider) using Napa Office 365 Development tool. So far, I have created picture Library Manually, and now trying to create Picture Library using ...
0
votes
1answer
66 views

Deleting and creating the Domain Group “Everyone” in Sharepoint 2013 using Powershell CSOM

With Powershell CSOM and SharePoint 2013, I am trying to reset the permission to the domain group "Everyone", with the name "c:0(.s|true". Therefore I want to delete and recreate it, so that all the ...
0
votes
2answers
123 views

Get User id from people picker client side

I have created people picker on client side using SPpeoplepicker.js. $("#peoplePickerDiv").spPeoplePicker(); Everything works perfect all user display in people picker and i can select multiple ...