SharePoint
SharePoint is a web-based collaborative platform that integrates with Microsoft Office. Launched in 2001, SharePoint is primarily sold as a document management and storage system, but the product is highly configurable and usage varies substantially among organizations.
Microsoft Graph API
Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows 10, and Enterprise Mobility + Security. Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users.
Microsoft Graph exposes REST APIs and client libraries to access data on the following Microsoft cloud services
- Microsoft 365 services: Delve, Excel, Microsoft Bookings, Microsoft Teams, OneDrive, OneNote, Outlook/Exchange, Planner, SharePoint, Workplace Analytics.
- Enterprise Mobility and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active Directory, Identity Manager, and Intune.
- Windows 10 services: activities, devices, notifications, Universal Print (preview).
- Dynamics 365 Business Central.
Please ref to following link to know more about Microsoft Graph.
Process
Pre-requisites
- Need to have Azure App (Client ID and Client Secret)
- Need Application Permissions for that App (Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All)
Step 1
For Demo I am uploaded some prospect files into share point site
Step 2
Get Access Token using “https://login.microsoftonline.com/%5BTenantId%5D/oauth2/v2.0/token“
Step 3
Get site id from “https://graph.microsoft.com/v1.0/sites?search='%5BSite Name]’“
Step 4
Get drive id from “https://graph.microsoft.com/v1.0/sites/%5Bsiteid%5D/drives/“
Step 5
Get List items from SharePoint “https://graph.microsoft.com/v1.0/sites/%5Bsiteid%5D/drives/[driveid]/root/children“
Happy Learning !!
Hi Grirish. Great post with useful information. Would be better if you could share the config of the tRest1 component too. Can’t figure out where I’m supposed to put the client and tenant credentials to receive access tokens. Would be great if you could expand on this too.
LikeLike
Hi
Thanks for your knowledge sharing, Can we use the same technic to get data in sharepoint lists ?
Br
Petter
LikeLike