Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SharePoint Development with the SharePoint Framework

You're reading from  SharePoint Development with the SharePoint Framework

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781787121430
Pages 386 pages
Edition 1st Edition
Languages
Authors (2):
Jussi Roine Jussi Roine
Profile icon Jussi Roine
Olli Jääskeläinen Olli Jääskeläinen
Profile icon Olli Jääskeläinen
View More author details
Toc

Table of Contents (14) Chapters close

Preface 1. Introducing SharePoint Online for Developers 2. Developing Solutions for SharePoint 3. Getting Started with the SharePoint Framework 4. Building Your First Web Part 5. Using Visual Studio Code and Other Editors 6. Packaging and Deploying Solutions 7. Working with SharePoint Content 8. Working with the Web Part Property Pane 9. Using React and Office UI Fabric React Components 10. Working with Other JavaScript Frameworks 11. Troubleshooting and Debugging SharePoint Framework Solutions 12. SharePoint APIs and Microsoft Graph 13. The Future of SharePoint Customizations

A quick primer on Microsoft Graph

Microsoft Graph is an ever-growing collection of APIs that can be uniformly accessed through a common contract. The idea with Microsoft Graph is that developers would only need to learn one set of authentication, authorization, and access models to access any kind of cloud-based service within Office 365. For now, Microsoft Graph does not provide parity for all SharePoint Online REST APIs, but it has a fairly good collection of modernized APIs developers may wish to use for their applications.

Using Microsoft Graph is essentially more helpful with Graph Explorer, which is a web-based tool for figuring out what data there is and where it lies. It can be accessed through the Microsoft Graph marketing page at https://graph.microsoft.io/, by clicking Graph Explorer on the top navigation:

You can try out the APIs in a demo tenant, or by clicking Sign in, you can access your real data. Keep in mind that the Graph Explorer is built and operated by Microsoft, but it's still a good idea to avoid logging in with your global admin account unless you absolutely and unconditionally trust the service.

After logging in and running the default query against Microsoft Graph, the /me/ object resolves to your current account's metadata:

To target the queries against my SharePoint Online site, I need to change queries from /v1.0/me/ to /beta/, as SharePoint Online APIs are still in beta for Microsoft Graph.

Under /beta, I can point my queries to /beta/sharePoint/ (note the lowercase 's', and capital 'P') and then to /beta/sharePoint/site/lists:

This returns a clean list formatted in JSON for us to use within our code. The purpose of the Graph Explorer is to allow the developer to rapidly test against live data and figure out the correct API queries.

Graph Explorer has an intellisense-style helper built-in, so when you're constructing your queries, you should see a small window popup and provide suggestions for the current query:

All Microsoft Graph SharePoint Online APIs are referenced and documented here: https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/sharepoint.

You are free to combine your calls to different APIs between SharePoint Online REST APIs, Microsoft Graph calls, and perhaps also the SOAP Web Services. In addition, you could also build your own custom APIs using Microsoft Azure API Apps, Azure Functions, and similar services. A good practice is to first check Microsoft Graph for your needs. If you find it lacking for your specific requirements, check the SharePoint Online REST APIs, and only if these do not provide you with the necessary functionality, consider building your own custom APIs.

You have been reading a chapter from
SharePoint Development with the SharePoint Framework
Published in: Sep 2017 Publisher: Packt ISBN-13: 9781787121430
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}