SlideShare a Scribd company logo
Connect SharePoint
Framework solutions to APIs
secured with Azure AD
Waldek Mastykarz | @waldekm
SharePoint Saturday Belgium 2018
#SPSBE
Platinum
Gold
Silver
SharePint
Community
Thanks to our sponsors!
Authentication is difficult
Calling API secured with Azure AD prerequisites
What is OAuth?
Which flow do I need?
Which type of Azure AD app to create?
Which URLs to enter as Reply URLs?
…but I don’t know where users will put my web part or extension
extension
Is there an SDK I can use?
Does it work in TypeScript?
What if I add another web part to the page?
What if two web parts request token at the same time?
…
…so what do I enter in Reply URLs?
AadHttpClient 👍
Calling API secured with Azure AD prerequisites
What is OAuth?
Which flow do I need?
Which type of Azure AD app to create?
Which URLs to enter as Reply URLs?
…but I don’t know where users will put my web part or extension
extension
Is there an SDK I can use?
Does it work in TypeScript?
What if I add another web part to the page?
What if two web parts request token at the same time?
…
…so what do I enter in Reply URLs?
It. Just. Works.
Connect to Azure AD-secured
APIs from SPFx
without headaches
Connect to Azure AD-secured APIs using the
AadHttpClient
SharePoint
Online
Client-side web part
Azure
Active
Directory
"SharePoint Online Client“
Permissions - xyz
Tenant administrator configures what
scopes are available for the
MSGraphClient and AadHttpClient by
configuring permissions to specific
pre-provisioned application in the
Azure Active Directory.
1
3
2
Configured access tokens
automatically included in the call
with needed permissions
Request access tokens from
the Azure AD side for the used
application
Custom API
Takeaways
• Use the AadHttpClient class to access Azure AD-secured APIs wldk.nl/spsbe03
• Don’t pass web part context into React components wldk.nl/spsbe04
• Enable CORS for your API wldk.nl/spsbe05
• Setup API permissions in your tenant wldk.nl/spsbe03
• Each piece of JavaScript can access approved APIs wldk.nl/spsbe06
• Setup API permissions without packages wldk.nl/spsbe07
• Additional configuration required for multi-tenant apps wldk.nl/spsbe08
#SPSBE
http://spsbe.be
Please rate this session!
SharePoint Saturday Belgium 2018
#SPSBE

More Related Content

PPTX
Microsoft Flow in Real World Projects: 2 Years later & What's next
PPTX
Advanced PowerShell for Office 365
PPTX
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
PPTX
SPSBE18: New era of customizing site provisioning
PPTX
API Management and Hybrid Integration
PPTX
Azure Logic Apps
PPTX
Serverless Architecture - Azure Logic apps
PPTX
Azure Integration in Production with Logic Apps and more
Microsoft Flow in Real World Projects: 2 Years later & What's next
Advanced PowerShell for Office 365
Make IT Pro's great again: Microsoft Azure for the SharePoint professional
SPSBE18: New era of customizing site provisioning
API Management and Hybrid Integration
Azure Logic Apps
Serverless Architecture - Azure Logic apps
Azure Integration in Production with Logic Apps and more

What's hot (20)

PPTX
Integrating SaaS application using Microsoft’s Azure App Service Platform
PPTX
Workflow All the Things with Azure Logic Apps
PDF
Understanding SharePoint Framework Extensions
PPTX
Microsoft Azure Logic apps
PPTX
Building Azure Logic Apps
PPTX
Logic apps and PowerApps - Integrate across your APIs
PPTX
Why you shouldn't probably care about Machine Learning
PPTX
Azure Logic Apps and Microsoft Flows
PPTX
APIs, APIs Everywhere!
PPTX
Serverless CQRS in Azure!
PPTX
Logic Apps – Deployments
PDF
O365Con18 - Azure AD Connect Inside and Out - Sander Berkouwer
PPTX
Application Insights for Integration Developers
PPTX
Integration Monday - Logic App Patterns
PPTX
Azure logic app
PPTX
Introduction to Azure Functions - Tutorial
PPTX
The Hitchhiker’s Guide to Hybrid Connectivity
PPTX
Public v1 real world example of azure functions serverless conf london 2016
PDF
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
PPTX
Introduction to Azure Functions
Integrating SaaS application using Microsoft’s Azure App Service Platform
Workflow All the Things with Azure Logic Apps
Understanding SharePoint Framework Extensions
Microsoft Azure Logic apps
Building Azure Logic Apps
Logic apps and PowerApps - Integrate across your APIs
Why you shouldn't probably care about Machine Learning
Azure Logic Apps and Microsoft Flows
APIs, APIs Everywhere!
Serverless CQRS in Azure!
Logic Apps – Deployments
O365Con18 - Azure AD Connect Inside and Out - Sander Berkouwer
Application Insights for Integration Developers
Integration Monday - Logic App Patterns
Azure logic app
Introduction to Azure Functions - Tutorial
The Hitchhiker’s Guide to Hybrid Connectivity
Public v1 real world example of azure functions serverless conf london 2016
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
Introduction to Azure Functions
Ad

Similar to Connect SharePoint Framework solutions to APIs secured with Azure AD (20)

PDF
O365Con18 - Connect SharePoint Framework Solutions to API's secured with Azur...
PPTX
Developing Apps with Azure AD
PPTX
harePoint Framework Webinar Series: Consume Graph APIs in SharePoint Framework
PPTX
SPConnect2014 Office 365 APIs
PPTX
SPFx Webinar Loading SharePoint data in a SPFx Webpart
PDF
24032022 Zero Trust for Developers Pub.pdf
PDF
Leveraging APIs from SharePoint Framework solutions
PPTX
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
PPTX
SharePoint Conference 2018 - APIs, APIs everywhere!
PPTX
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
PPTX
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
PPTX
Azure AD for browser-based application developers
PPTX
Calling APIs with SharePoint Framework
PPTX
Mastering Modern Authentication and Authorization Techniques for SharePoint, ...
PPTX
SharePoint and Office Development Workshop
PDF
Spca2014 office365 ap is full hackett obrien
PPTX
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
PDF
SPS Dakar 2018 - Microsoft Graph Azure AD Authentication - Gora Leye
PDF
De la bonne utilisation de OAuth2
PPTX
Connected Office 365 with UWP
O365Con18 - Connect SharePoint Framework Solutions to API's secured with Azur...
Developing Apps with Azure AD
harePoint Framework Webinar Series: Consume Graph APIs in SharePoint Framework
SPConnect2014 Office 365 APIs
SPFx Webinar Loading SharePoint data in a SPFx Webpart
24032022 Zero Trust for Developers Pub.pdf
Leveraging APIs from SharePoint Framework solutions
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs wi...
SharePoint Conference 2018 - APIs, APIs everywhere!
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
Azure AD for browser-based application developers
Calling APIs with SharePoint Framework
Mastering Modern Authentication and Authorization Techniques for SharePoint, ...
SharePoint and Office Development Workshop
Spca2014 office365 ap is full hackett obrien
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
SPS Dakar 2018 - Microsoft Graph Azure AD Authentication - Gora Leye
De la bonne utilisation de OAuth2
Connected Office 365 with UWP
Ad

More from BIWUG (20)

PPTX
Biwug20190425
PDF
Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
PPTX
Global Office 365 Developer Bootcamp
PPTX
Deep dive into advanced teams development
PPTX
SharePoint wizards - no magic needed, just use Microsoft Flow
PPTX
Modern collaboration in teams and projects with Microsoft 365
PDF
Mining SharePoint data with PowerBI
PPTX
Don't simply deploy, transform! Build your digital workplace in Office 365
PPTX
Cloud First. Be Prepared
PPTX
New era of customizing site provisioning
PPTX
Microsoft Stream - Your enterprise video portal unleashed
PDF
What's new in SharePoint Server 2019
PPTX
Transforming your classic team sites in group connected team sites
PDF
Teams - There's no place like home
PPSX
The Future State of Document Management, Taxonomies and Metadata in the Cloud
PPTX
Model Driven PowerApps
PDF
Deploying in a Cloud First World
PPTX
Microsoft Flow advanced: tips, pitfalls, problems and warnings to be known be...
PDF
The business and end user guide into the new and modern SharePoint
PPTX
Extend your development skills set using MS Graph
Biwug20190425
Working with PowerShell, Visual Studio Code and Github for the reluctant IT Pro
Global Office 365 Developer Bootcamp
Deep dive into advanced teams development
SharePoint wizards - no magic needed, just use Microsoft Flow
Modern collaboration in teams and projects with Microsoft 365
Mining SharePoint data with PowerBI
Don't simply deploy, transform! Build your digital workplace in Office 365
Cloud First. Be Prepared
New era of customizing site provisioning
Microsoft Stream - Your enterprise video portal unleashed
What's new in SharePoint Server 2019
Transforming your classic team sites in group connected team sites
Teams - There's no place like home
The Future State of Document Management, Taxonomies and Metadata in the Cloud
Model Driven PowerApps
Deploying in a Cloud First World
Microsoft Flow advanced: tips, pitfalls, problems and warnings to be known be...
The business and end user guide into the new and modern SharePoint
Extend your development skills set using MS Graph

Recently uploaded (20)

PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Funds Management Learning Material for Beg
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
innovation process that make everything different.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
Digital Literacy And Online Safety on internet
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
DOCX
Unit-3 cyber security network security of internet system
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Internet___Basics___Styled_ presentation
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
Introduction to the IoT system, how the IoT system works
PDF
Paper PDF World Game (s) Great Redesign.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Funds Management Learning Material for Beg
presentation_pfe-universite-molay-seltan.pptx
The New Creative Director: How AI Tools for Social Media Content Creation Are...
innovation process that make everything different.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Digital Literacy And Online Safety on internet
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Design_with_Watersergyerge45hrbgre4top (1).ppt
Unit-3 cyber security network security of internet system
Exploring VPS Hosting Trends for SMBs in 2025
SASE Traffic Flow - ZTNA Connector-1.pdf
Internet___Basics___Styled_ presentation
Module 1 - Cyber Law and Ethics 101.pptx
Introduction to the IoT system, how the IoT system works
Paper PDF World Game (s) Great Redesign.pdf

Connect SharePoint Framework solutions to APIs secured with Azure AD

  • 1. Connect SharePoint Framework solutions to APIs secured with Azure AD Waldek Mastykarz | @waldekm SharePoint Saturday Belgium 2018 #SPSBE
  • 4. Calling API secured with Azure AD prerequisites What is OAuth? Which flow do I need? Which type of Azure AD app to create? Which URLs to enter as Reply URLs? …but I don’t know where users will put my web part or extension extension Is there an SDK I can use? Does it work in TypeScript? What if I add another web part to the page? What if two web parts request token at the same time? … …so what do I enter in Reply URLs?
  • 6. Calling API secured with Azure AD prerequisites What is OAuth? Which flow do I need? Which type of Azure AD app to create? Which URLs to enter as Reply URLs? …but I don’t know where users will put my web part or extension extension Is there an SDK I can use? Does it work in TypeScript? What if I add another web part to the page? What if two web parts request token at the same time? … …so what do I enter in Reply URLs?
  • 8. Connect to Azure AD-secured APIs from SPFx without headaches
  • 9. Connect to Azure AD-secured APIs using the AadHttpClient SharePoint Online Client-side web part Azure Active Directory "SharePoint Online Client“ Permissions - xyz Tenant administrator configures what scopes are available for the MSGraphClient and AadHttpClient by configuring permissions to specific pre-provisioned application in the Azure Active Directory. 1 3 2 Configured access tokens automatically included in the call with needed permissions Request access tokens from the Azure AD side for the used application Custom API
  • 10. Takeaways • Use the AadHttpClient class to access Azure AD-secured APIs wldk.nl/spsbe03 • Don’t pass web part context into React components wldk.nl/spsbe04 • Enable CORS for your API wldk.nl/spsbe05 • Setup API permissions in your tenant wldk.nl/spsbe03 • Each piece of JavaScript can access approved APIs wldk.nl/spsbe06 • Setup API permissions without packages wldk.nl/spsbe07 • Additional configuration required for multi-tenant apps wldk.nl/spsbe08