How to get the SharePoint Folder Details based on it's GUID - sharepoint

I am migrating SharePoint application from SharePoint to SharePoint CSOM. The SharePoint server is 2013 in house server. Previously I have a direct function in SharePoint to get the Folder Details by it's GUID.
Direct Function
Web.GetFolder(GUID).
Now as I am migrating the SharePoint code to SharePoint CSOM I didn't find any direct method to get the folder details based on the GUID. I am using the reference of SharePointPnPCore2013 for migrating it to SharePoint CSOM. Can you help me with any method reference to get the folder details based on GUID.

Sample code for your reference(SharePoint CSOM).
var specialFolder = context.Web.GetFolderById( new Guid("471f031a-4b7d-4a18-bb63-310923e5c285"));
context.Load(specialFolder);
context.ExecuteQuery();

Related

Creating User Alerts in SharePoint Online Through Csom/ Powershell Csom

is there any way to create user alerts through csom for sharepoint online? I am not able to find any msdn references for this?
It seems to be not available in Client Object Model for SharePoint Online.
Take a look to this thread:
https://social.msdn.microsoft.com/Forums/en-US/b59f652e-54d7-449f-bc46-182ae86c0c08/action?threadDisplayName=o365-user-alerts-via-csom

Which set of APIs should be used for Office365 Sharepoint

Which set of APIs should be use to access Office365 sharepoint which includes both sharepoint2013 and sharepoint2016.
Have gone through the following APIs
1) Sharepoint2013 REST APIs(https://msdn.microsoft.com/en-us/library/office/jj860569.aspx).
2) OneDrive new APIs(https://github.com/OneDrive/onedrive-api-docs) through which we can access the Directory folder which contains directory and files. But the present focus of APIs are for OneDrive Personal and Business.
Apart from this is there any other APIs which can access the office365 sharepoint?
You could use SharePoint REST API to retrieve, update, and manage data in Sharepoint Online ,you could find code samples and videos from here.
With Graph API you could get files/users/groups ,but SharePoint sites and lists are not yet available via Microsoft Graph .
In addition ,you could also use SharePoint client object model (CSOM) to manage data in Sharepoint Online,please read below article:
Connect to SharePoint Online using Client Object Model

List Microsoft Sharepoint Sites with Microsoft Graph

I'm working with Microsoft OneDrive and Microsoft Sharepoint using Microsoft Graph, and as I understood:
Url to get file list from logged in user OneDrive is:
/v1.0/me/drive/root/children
Url to get file list from company Sharepoint Documents is:
/v1.0/drive/root/children
So my questing is:
How to list Sharepoint Sites that user is following and upload files to this Sites
This isn't possible yet. You need to use the direct SharePoint API end point to access content from SharePoint Sites.
Graph API supports accessing OneDrive, OneDrive for Business, and the document library for an Office 365 Group only.

Enterprise custom field value using SharePoint API

Is it possible to get project's enterprise custom field value using SharePoint 2010 API?
Well, Project Server has its own data structure and you cannot access it from SharePoint API. You have to use Project Server PSI.

Access sharepoint list from windows application

Can anyone tell me if I have some ways to access to sharepoint list from windows app?
I've tryed following way (i'm under user that is sharepoint member):
SPUserToken token = new SPUserToken(
BitConverter.GetBytes(WindowsIdentity.GetCurrent().Token.ToInt32()));
SPSite site = new SPSite(siteName, token);
but no luck...
Your best bet is to use a web reference to query the SharePoint WebService's GetListItems web method:
http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
Like Jason said, to be able to use the SharePoint Object model (i.e. the sharepoint dll's) the app needs to be running on the same machine as SharePoint. If it is anywhere else you can only use the Web Services provided by SharePoint (or create your own and deploy that to your sharepoint server).
P.S. In SharePoint 2010 you have the client object model at your disposal, basically a subset of the full sharepoint object model (Kinda like Silverlight). Of course sp2010 is still in beta....
This article provides an excellent and detailed step by step tutorial on how to do this using Linq and Web services. It does create a console application instead of a Windows application but it is very easy to translate this into a Windows Form app if needed. I found this article very useful when I started working on programatically communicating with SharePoint lists because it clearly demonstrates how easy it is to work with the web service response from SharePoint using LINQ.
Is siteName on the same computer that you are running the windows application from? If not, then you won't be able to access that site if you're using SharePoint 2007.
If the above isn't the problem, then check that the user account WindowsIdentity.GetCurrent() is at least a site owner on siteName.

Resources