sharepoint

SharePoint 基于 REST API使用简介

。_饼干妹妹 提交于 2020-02-08 07:44:43
之前已经介绍了SP2010中支持CSOM的API进行远程访问SharePoint,但是CSOM的API仍然有一定的局限性,首先使用CSOM类库是基于.Net的,因此也将使用CSOM限制在了.Net平台上(包括托管的.Net代码,Silver Light 以及Javascript)。如何能在非.Net平台上操作SharePoint数据呢? 本文简单介绍一下SharePoint REST api的使用方式,笔者本人也没有用到过相关技术进行开发,难免有理解不到位的地方。欢迎大家拍砖。 读懂此文章,建议你至少大概的知道,什么是REST api,为什么使用REST api,它的优势在哪。本文不会展开讲述讲述REST相关的知识。 REST API架构 从SharePoint2013开始,REST被集成到了SharePoint中,你可以创建一个RESTful 的HttpWebRequest来访问SharePoint数据。REST的大体架构如下: 首先,通过用OData标准,创建一个符合你想要调用的Client Object Model的API所匹配的Http请求。SharePoint服务器端在通过client.svc处理HttpRequest后,会返回相应的Atom或者JSON。 如何生成一个RESTful的HttpRequest 在SharePoint的Client Object Model

Power BI Report Builder - SharePoint as data source

混江龙づ霸主 提交于 2020-02-07 04:14:06
问题 Is it possible to use Power BI Report Builder to connect to a SharePoint list? It seems that it was possible to do that with the old SSRS Report Builder - link. I would like to Build a SSRS-like report with Power BI using different SharePoint lists as Data Sources. I tried to use the Power BI Desktop app to build a report but I couldn't matrix/tables/sections repetitions. 回答1: In the latest update(July 2019) of Power BI Report Builder, you can use NON-PREMIUM datasets from Power BI Service as

MS Outlook VBA to upload email attachment to a Sharepoint with authentication

好久不见. 提交于 2020-02-06 08:31:10
问题 I'm still sort of a beginner in using VBA and I've been trying to figure out how to upload a file via VBA in MS Outlook to a Sharepoint. I've tried mapping the Sharepoint to my Network Drive and such but to no avail. My code is as follows: Public Sub saveAttachSentDate(MItem As Outlook.MailItem) Dim oAttachment As Outlook.Attachment Dim sSaveFolder As String Dim file As String Dim DateFormat As String sSaveFolder = "(URL of the sharepoint along with the folder to save it on)" For Each

MS Outlook VBA to upload email attachment to a Sharepoint with authentication

余生长醉 提交于 2020-02-06 08:29:33
问题 I'm still sort of a beginner in using VBA and I've been trying to figure out how to upload a file via VBA in MS Outlook to a Sharepoint. I've tried mapping the Sharepoint to my Network Drive and such but to no avail. My code is as follows: Public Sub saveAttachSentDate(MItem As Outlook.MailItem) Dim oAttachment As Outlook.Attachment Dim sSaveFolder As String Dim file As String Dim DateFormat As String sSaveFolder = "(URL of the sharepoint along with the folder to save it on)" For Each

Retrieve Sharepoint List by Js

柔情痞子 提交于 2020-02-06 03:43:11
问题 I created a sharepoint list with four columns. I named them as follows: Name, Position, Office, Salary. Could you please help me how to retrieve items from my list (using JavaScript)? 回答1: You can use the below sample code where you need to replace your site url, list and columns: Get SharePoint List Items using JavaScript coding: var siteUrl = 'https://siteUrl'; var listName= 'MyCustomListName'; function retrieveListItems() { var clientContext = new SP.ClientContext(siteUrl); var oList =

How to import an SPWeb using c# to have the same behavior than PowerShell?

耗尽温柔 提交于 2020-02-05 03:53:26
问题 I have a problem with comportment of sharepoint.deployment.spimport. I want to copy a web within the same site collection like that : myserver/mysitecoll/website1 myserver/mysitecoll/website2 When I use the PowerShell command to execute this, it does it perfectly, the website2 is the same as the website1 Export-SPWeb -Identity http://myserver/mysitecoll/website1 -Path D:\mybackups\mytestsave\mybackup.bak and Import-SPWeb -Identity http://myserver/mysitecoll/website2 -Path D:\mybackups

C# Windows Application SharePoint Login

雨燕双飞 提交于 2020-02-04 04:02:09
问题 string urlSite = "https://intranet.site.dk"; string user = "myuser@vid.net.local"; string pwd = "mypass"; using (ClientContext clientContext = new ClientContext(urlSite)) { SecureString passWord = new SecureString(); foreach (char c in pwd.ToCharArray()) passWord.AppendChar(c); clientContext.Credentials = new SharePointOnlineCredentials(user, passWord); Web web = clientContext.Web; clientContext.Load(web); clientContext.ExecuteQuery(); Console.WriteLine(web.Title); Console.ReadLine(); } I'm

Is it possible to share an existing asp.net applications membership database with sharepoint 2010's, when using Forms based authentication

荒凉一梦 提交于 2020-02-03 15:37:05
问题 I am trying to integrate an existing asp.net application with sharepoint 2010. I would like to be able to have a logged in user on the application access a document library via an Iframe on the sharepoint 2010 site. I want to use FBA on sharepoint. Is it possible to share the membership database from the asp.net application with sharepoint? If not, what would be the best way to accomplish this? 回答1: The databases are identical so there is no reason you can't point the SharePoint FBA

Javascript - How to hide a drop down control if it's empty

橙三吉。 提交于 2020-02-02 14:30:33
问题 I have a cascade dropdown on a form. User selects Document Type and most of the document type has Category. However, if a doc type does not have category then I would like to hide the category drop down. Is there a way to see if category dropdown (calculate array or something) and hide category control (by default it always show Select a value even if the drop down does not have any value to select from) So far I have following and wondering how to evaluate category drop down control based on

SPFx webpart in MSTeams Desktop Client throws an UnauthorizedAccessException

﹥>﹥吖頭↗ 提交于 2020-02-02 13:06:10
问题 This question is very similar to a question which has been asked previously on StackOverflow. However, the error I'm getting is different. AadHttpClient fails when loading SP page with SPFx webpart in MSTeams Desktop Client I also have a Sharepoint Online site in which I have an SPfx web part which makes use of AadHttpClient. This webpart works if I navigate to the Sharepoint site from a browser or open MS Teams web client. My setup is as follows: I have a team in MS Teams I added a new tab