csom

Azure Active directory Sharepoint & Graph API

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:14:46
问题 I am in a bit of confusion how to get a bearer token that will work for a sharepoint sites as well as the graph api. We are using MFA (Multi factor authentication) so we get a text message when the user tries to login. This all works and we get a token back but the resource I am pointing to is https://srmukdev.sharepoint.com/, how can we use this token to access the https://graph.microsoft.com/ api. At the moment it doesn't work. I can make separate login requests, but we dont want to do this

Where is a SiteLogoUrl in CSOM?

拟墨画扇 提交于 2019-12-10 15:29:23
问题 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 回答1: It was moved to the POST request that SharePoint creates while redirecting via appredirect.aspx. So, the only one way to get Site Logo Url is to handle appredirect POST request. To initiate redirect you should use this code snippet: Response.Redirect(TokenHelper.GetAppContextTokenRequestUrl(sharePointHostUrl,

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

痴心易碎 提交于 2019-12-09 14:42:38
问题 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

SyntaxError: Failed to execute 'querySelector' on 'Document': '[object HTMLDocument]' is not a valid selector

不问归期 提交于 2019-12-08 22:07:21
问题 I am trying to get all field values from a sharepoint list item on a display template, the ctx.CurrentItem only gets some values but not all I need. I tried the following code, but I get the error on the title SyntaxError: Failed to execute 'querySelector' on 'Document': '[object HTMLDocument]' is not a valid selector. function GetListItemById_Success(sender, args) { var id = ListItem.get_id(); var title = ListItem.get_item("Title"); alert("Updated List Item: \n Id: " + id + " \n Title: " +

How to manage client context object in seperate class library?

守給你的承諾、 提交于 2019-12-08 16:44:00
问题 I am trying to create a library(class library) for sharepoint which will have all sharepoint dll to interact with sharepoint server to upload files,documents and create document library and document set . Now this library could be consumed by clients like web application(asp.net webform or mvc) or console application or web api/wcf services or windows form anything. So here I am bit confused with creating repository patterna and unit of work layer in order to manage client context object. I

Get User/Group Permissions for List using javascript(ecmascript)

早过忘川 提交于 2019-12-08 08:37:15
问题 I am trying to use the javascript object model to retrieve a list of users/groups for a list and their permissions at the list level. So far I have this which returns a member object but I cant get any information about the member. When I try to use rAssignment.get_member().get_id(), or rAssignment.get_member().get_title() I get an error. //Get List Permissions function getListPerms() { var clientContext = new SP.ClientContext(); var siteColl = clientContext.get_site(); var site =

Retrieve events number from SharePoint calendar using JS

若如初见. 提交于 2019-12-08 00:23:37
问题 I have a SharePoint calendar list, and I'm looking for a script to retrieve the number of events on a day. For example, for today, 10 August, I want to just retrieve the number of events stored in my calendar. Any suggestion will be very helpful. 回答1: The Problem with Querying Calendars in JavaScript: Recurrence Ordinarily retrieving data from SharePoint with JavaScript is really straightforward (at least for versions beyond SharePoint 2007) using either REST or the JavaScript Object Model.

Retrieve events number from SharePoint calendar using JS

末鹿安然 提交于 2019-12-06 07:24:26
I have a SharePoint calendar list, and I'm looking for a script to retrieve the number of events on a day. For example, for today, 10 August, I want to just retrieve the number of events stored in my calendar. Any suggestion will be very helpful. Thriggle The Problem with Querying Calendars in JavaScript: Recurrence Ordinarily retrieving data from SharePoint with JavaScript is really straightforward (at least for versions beyond SharePoint 2007) using either REST or the JavaScript Object Model. However, calendars have functionality for creating recurring events which can complicate things. For

Sharepoint field has not been initialized in C#

百般思念 提交于 2019-12-06 07:03:20
问题 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 = oListItem[field.Title]; which states The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. It seems to me that I have initialized everything before that line.

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

社会主义新天地 提交于 2019-12-06 05:32:50
问题 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 in addition to this there is always a placeholder with WP's ID in the WikiField column. I've modified the existing server-side code seen on http://blog.mastykarz.nl/programmatically-adding-web-parts-rich-content-sharepoint-2010/ and http:/