csom

The remote server returned an error: (401) Unauthorized. Using CSOM in ASP.NET

泄露秘密 提交于 2019-12-04 03:38:44
I'm tried to pull some SharePoint 2013 list data I created which works fine when running locally on my machine and when run locally one the server. I'm user the same credentials when running both locally and locally on the server. The issue is when I publish and navigate to my ASP.NET app on the server I get the "The remote server returned an error: (401) Unauthorized." Error... I've looked at a bunch of the posts on stackoverflow and some other articles on the web This points out that the context seems to be using IUSR: http://blogs.msdn.com/b/sridhara/archive/2014/02/06/sharepoint-2013-csom

SharePoint Error: The server does not allow messages larger than 2097152 bytes

拟墨画扇 提交于 2019-12-04 01:04:04
I have web service that point to sharepoint 2013 Office 365. I use the client object model. I am trying to update the xml file which stores 4 attachments in it. When I do this when I have large binary data in the xml file I get the following error : Message The request message is too big. The server does not allow messages larger than 2097152 bytes. I realize I am probably going to have to seperate the attachments from the xml file but currently my infopath form stores them there. Is there a way I can increase the request length or maybe chunk up saving or something. I really just modifying

Access denied office 365 / SharePoint online with Global Admin account

 ̄綄美尐妖づ 提交于 2019-12-03 16:58:24
I am going crazy since two days solving an issue. The problem is; I am making a console APP which is talking to SharePoint Online using global admin account (One which was specified as admin while making a new subscription). What I am trying to achieve is, I want to add a custom action using CSOM to each site collection and subsite of office 365. That code works fine except on the root site collection which is pre-created by office 365 while signing up (i.e. https://xyz.sharepoint.com ) For any tenant for root site collection, it gives me below error; { "SchemaVersion":"15.0.0.0",

Moving a SharePoint folder and contents to different location in same Document Library

耗尽温柔 提交于 2019-12-03 16:04:25
I'm looking for a way to move a folder and all it's contents to a different location in the same library using the Client Object Model for SharePoint 2010 (C#). For example we have a folder for a project (say 12345) and it's URL is http://sharepoint/site/library/2012/12345 where 2012 represents a year. I'd like to programmatically move the 12345 folder to a different year, say 2014 which probably exists already but may not. I've searched around but the solutions I'm getting seem extremely complicated and relevant to moving folders to different site collections, I'm hoping because it's in the

Creating Folders programmatically in SharePoint 2013

百般思念 提交于 2019-12-03 02:14:48
Currently I have code that creates a Folder in the Documents directory when run: using (var context = new Microsoft.SharePoint.Client.ClientContext(sharePointSite)) { context.Credentials = new Microsoft.SharePoint.Client.SharePointOnlineCredentials(user, password); Web web = context.Web; Microsoft.SharePoint.Client.List docs = web.Lists.GetByTitle(<upper level folder>); docs.EnableFolderCreation = true; docs.RootFolder.Folders.Add(folderName); context.ExecuteQuery(); return true; } I am having troubles creating sub folders in folders that I have created using this code already. So like if I

How to solve Sharepoint CSOM HTTP Request Error 429?

久未见 提交于 2019-12-01 14:27:49
The sharepoint often displays error 429 (Too many requests) and we have already taken all the actions described in the article below, but some requests continue to be blocked. https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online Our scenario involves a customized desktop application (add-in) for Word, Excel, Power Point and Outlook that accesses the Sharepoint through CSOM (with user's network credentials) and we already registered this Add-in through the "/_layouts/15/AppRegNew.aspx" page and decorated all of our

How to solve Sharepoint CSOM HTTP Request Error 429?

ぃ、小莉子 提交于 2019-12-01 12:34:19
问题 The sharepoint often displays error 429 (Too many requests) and we have already taken all the actions described in the article below, but some requests continue to be blocked. https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online Our scenario involves a customized desktop application (add-in) for Word, Excel, Power Point and Outlook that accesses the Sharepoint through CSOM (with user's network credentials) and we

The collection has not been initialized

给你一囗甜甜゛ 提交于 2019-12-01 09:33:44
问题 I am trying to retrieve all items from a Sharepoint library with CSOM and create a list of it. I am sure it has something to do with the order of the code. The question is how? ListItemCollection collListItem = oList.GetItems(camlQuery); var newList = new List<Item>(); var items = oList.GetItems(camlQuery); context.Load(collListItem); context.ExecuteQuery(); foreach (var col in items) { newList.Add(new Item() { ID = Convert.ToInt32(col["ID"]), }); } I get the following error: The collection

downloading a file from SharePoint Online with PowerShell

别等时光非礼了梦想. 提交于 2019-11-30 16:21:30
问题 I have a requirement to download files from a sharepoint online document library using powershell I've managed to get to the point where the download should happen but no luck. I know its something to do with how I am using the stream/writer any hints would be greatly appreciated *Edit No error messages are thrown just 0 length files in my local Directory $SPClient = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") $SPRuntime = [System.Reflection.Assembly]:

How to get items from a Sharepoint Online list using PowerShell?

大城市里の小女人 提交于 2019-11-30 16:14:35
问题 I'm writing a PowerShell script that connects to a SharePoint website and I'm trying to get the items on a list. Here's my code: $Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $SitePassword = ConvertTo-SecureString $SitePwd -AsPlainText -Force $Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($SiteUser,$SitePassword) $Context.Credentials = $Creds $web = $Context.Web $Context.Load($web) $Context.ExecuteQuery() $List = $Context.Web.Lists