SlideShare a Scribd company logo
1 of 36
Introduction to the Microsoft
Graph : Getting Started Quickly
& Getting the Most Out of It
SharePoint Fest Seattle 2019
Vincent Biret
Passionate about technologies, development and community
Vincent Biret
@baywet
bit.ly/vince365
Microsoft Office Dev MVP
Azure and Office 365 developer @ 2toLead
Audience?
Agenda
•Introduction to the Microsoft Graph
•Authentication & authorization
•Azure Functions
•Tips
•Conclusion
Ready?
The Microsoft Graph
Regardless of your development model, the Microsoft Graph grants access to a wealth of
data
Your gateway to Microsoft 365
Your
app
Gateway
Your data or
your
customer’s
Office 365 Windows 10 Enterprise Mobility and Security
1Microsoft Graph
The Microsoft Graph provides a unified auth model and set of API’s for both pro and
personal accounts/data
Personal and professional accounts
(lucy)
The Microsoft Graph is the fastest growing API at Microsoft
Some numbers
18TNodes
181Countries
1BMonthly active apps
90%F500 companies have data
available via Microsoft
Graph
180MMonthly active users in
Microsoft 365
100BRequests each month
https://graph.microsoft.com
Microsoft Graph started with Office 365 and became THE API for enterprise and personal
data
What data is available?
Users, Groups, Organizations
Outlook
SharePoint
OneDrive
Teams
Planner
Excel
OneNote
Activities
Devices relays
Commands
Notifications
Azure AD
Intune
Identity Manager
Advanced Threat Analytics
Advanced Threat Protection
Email, Calendar,
Contacts and Tasks
Sites and Lists
Disks and Files
Channels, Messages
Tasks and Plans
Worksheets
Notes, and more…
Identity management
Access control
Synchronization
Domains
Organizational units
Applications and Devices
Threats analysis
Threats protection
Alerts
Policies
And more…
Office 365 Windows 10 Enterprise mobility and security
Dynamics 365
Finances
One of the key points of the Microsoft Graph is providing a unified data model
Wide and transversal API
SITES
GROUPS
USERSINSIGHTS
CONTACTS
PEOPLE
ORGANIZATION
EMAIL
CONTENT
DOCUMENTS
DEVICES
TEAMS
REPORTS
ME
ADMIN UNITS
ROLES
APPS
SECURITY DATA &
AUTOMATION
ORGANIZATION
USERS
BUSINESS
PARTNER
Microsoft provides a consistent approach to the API
Basics
• HTTP verbs represent the intent: GET | POST | PATCH | PUT | DELETE
• Version: /v1.0 or /beta
• Resource: /users, /groups, /sites, /drives, /devices, …
• Collection item: /users/john
• Property: /users/john/department
• Linked data via navigation: /users/john/events
• Query parameters: /users/john/events?$top=5
o Format: $select | $orderby
o Filter/Navigate: $filter | $expand
o Pagination: $top | $skip | $skiptoken
/{version} ?{parameters}/{resource}/{id}/{property}
Various supported languages and platforms
SDKs
Generally Available ( /v1.0 ) Preview ( /beta )
And Soon
Documentation, samples, quick starts and asking for help
Demo
Authentication
and authorization
Resources provided by the Graph are always secured. Depending on the authentication
flow, you might need multiple tokens.
Base principles
access_token
MSAL or
ADAL
Your APP
Microsoft
Graph
id_token
access_token refresh_token
Microsoft
Identity
It is crucial to think through your auth scenario before starting development as it has a
deep impact.
Contexts types
Users can consent for their data, admins for the whole tenant Only admins can consent
Delegated
permissions
User’s
privileges
App
permissions
Permission Type: applicationPermission Type: Delegated
Access as a user Access as a service
Effective PermissionsEffective Permissions
Permissions follow a description model. Tip: always request the least permissions
Permissions/scopes structure
specific: .All,
.Shared, etc
Read,
ReadWrite,
etc.
Target Entity:
files, mail,
groups,
calendars,
etc…
Ex: User.Read Directory.ReadWrite.All
Resource Action Scope
Microsoft has been working really hard to improve the situation. This is why it’s important
to think your auth.
Complex situation
Your target
audience
ADALSDK Client
App Reg.
MSAL
Endpoint
App registration experience
Demo
Azure Functions
Improving the « pay for what you use » and the elasticity principles, it also provides a
total abstraction of servers
Serverless definition
Enable your team to deliver solutions faster, in a more structured way moving the focus
on the business logic
Benefits
Google Cloud Functions and AWS Lambdas are direct competitors of Azure Functions
Offerings
5 languages supported for production in Azure Functions and more to come
Languages (v2)
Solution “I’m sick boss”
Demo
Tips
Microsoft is trying to improve your Graph dev experience
$whatif
• Simply add $whatif at the end of a request to know where the data is coming from
• Useful when debugging
• /me/?$whatif
{
"Description": "Execute HTTP request",
"Uri": "https://graph.windows.net/v2/c03a026e-335e-458c-bad2-
3309fe59663b/users('c9452811-4b6e-4073-b7cf-
3f681f55539b')?$select=businessPhones,displayName,givenName,jobTitle,mail,mobi
lePhone,officeLocation,preferredLanguage,surname,userPrincipalName,id",
"HttpMethod": "GET"
}
A good knowledge of OData is key to build applications properly, even when using SDKs
Know your OData!
• Sets
• $count
• $filter
• $expand
• $orderby
• $select
• $skip/$skipToken
• $top
• Search
• $search
• Values
• $ref
• $value
Microsoft must define boundaries to keep the service up and running. This sandbox is
defined at multiple levels and revolves around multiple concepts which makes the
problem more complex.
Throttling – the problem
• Microsoft 365 is a set of services, usage always limited
• Relies on limited and costly resources (CPU, mmory, storage…)
• These limits can be dynamic or fixed
• API usage is dynamic
• Site collection storage is fixed
• You can expand the boundaries: type and/or number of licenses
• API usage limitation is defined per user (to start with)
• This limits impact on the service, users and revenue
The idea is to limit resource usage, spread out pic activity, allow key features to survive by
stopping minor features using the same resource or even tell users to slow down before
everything stops.
Throttling – what can you do?
• Implement read cache (if possible)
• In proc, in memory, distributed cache (Redis)
• Pay attention to Rate-Limit Limit, Remaining, and Reset headers
• Pay attention to 429’s or 503’s and impl. « exponential back-off retry policies»*
• Or better, retry after the delay provided by retry-after header
• Implement “Circuit Breaker” design pattern
• Limit incoming traffic using telemetry
Conclusion
All these developer productivity improvements translate to savings in development
investments and better productivity for end users which means better ROI!
Conclusion
•Great potential
•Consistent API
•Auth design is key
•Functions are here to help
•Shorter delivery time
•Better apps integration
•Better user experience
Check out these sessions to learn more about the Microsoft Graph
To go further
• 6 demos to impress your boss/customers with Microsoft Graph
• Jeremy Take AZR104 room 604 3PM
• Automating Provisioning for Your digital workplace : With Graph and
Azure Durable Functions
• Vincent Biret AZR303 room 604 Friday 3PM
Bit.ly/vince365 @baywet slideshare.net/VincentBIRET
Thanks!/Questions?
Vincent Biret
Office 365 and Azure
Developer, 2toLead
@baywet
Bit.ly/vince365
#SPFestSEA Introduction to #MicrosoftGraph

More Related Content

What's hot

What's hot (20)

2018-10-17 J1 4C - WEBCON prez - Practical results of managing a company with...
2018-10-17 J1 4C - WEBCON prez - Practical results of managing a company with...2018-10-17 J1 4C - WEBCON prez - Practical results of managing a company with...
2018-10-17 J1 4C - WEBCON prez - Practical results of managing a company with...
 
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
 
Azure Functions and Microsoft Graph
Azure Functions and Microsoft GraphAzure Functions and Microsoft Graph
Azure Functions and Microsoft Graph
 
#SPSToronto The SharePoint Framework and the Microsoft Graph on steroids with...
#SPSToronto The SharePoint Framework and the Microsoft Graph on steroids with...#SPSToronto The SharePoint Framework and the Microsoft Graph on steroids with...
#SPSToronto The SharePoint Framework and the Microsoft Graph on steroids with...
 
Build Agile Business Processes with Microsoft Power Platform
Build Agile Business Processes with Microsoft Power PlatformBuild Agile Business Processes with Microsoft Power Platform
Build Agile Business Processes with Microsoft Power Platform
 
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
#SPSottawa The SharePoint Framework and The Microsoft Graph on steroids with ...
 
Microsoft 365
Microsoft 365Microsoft 365
Microsoft 365
 
Make your Azure PaaS Deployment More Safe
Make your Azure PaaS Deployment More SafeMake your Azure PaaS Deployment More Safe
Make your Azure PaaS Deployment More Safe
 
Microsoft 365 Automation
Microsoft 365 AutomationMicrosoft 365 Automation
Microsoft 365 Automation
 
An introduction to Defender for Business
An introduction to Defender for BusinessAn introduction to Defender for Business
An introduction to Defender for Business
 
Empower Your Organization with Microsoft Power Platform
Empower Your Organization with Microsoft Power PlatformEmpower Your Organization with Microsoft Power Platform
Empower Your Organization with Microsoft Power Platform
 
Securing Intellectual Property using Azure Rights Management Services
Securing Intellectual Property using Azure Rights Management ServicesSecuring Intellectual Property using Azure Rights Management Services
Securing Intellectual Property using Azure Rights Management Services
 
#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraph#SPSOttawa introduction to the #microsoftGraph
#SPSOttawa introduction to the #microsoftGraph
 
O365Con18 - Deep Dive into Microsoft 365 - Jussi Roine
O365Con18 - Deep Dive into Microsoft 365 - Jussi RoineO365Con18 - Deep Dive into Microsoft 365 - Jussi Roine
O365Con18 - Deep Dive into Microsoft 365 - Jussi Roine
 
Microsoft Azure News - June 2016
Microsoft Azure News - June 2016Microsoft Azure News - June 2016
Microsoft Azure News - June 2016
 
Mobile First Middleware
Mobile First MiddlewareMobile First Middleware
Mobile First Middleware
 
Microsoft power platform
Microsoft power platformMicrosoft power platform
Microsoft power platform
 
Cloud Based Rights Management with Azure RMS
Cloud Based Rights Management with Azure RMSCloud Based Rights Management with Azure RMS
Cloud Based Rights Management with Azure RMS
 
O365Con18 - How to Run a Search Project in SharePoint - Matthew McDermott
O365Con18 - How to Run a Search Project in SharePoint -  Matthew McDermottO365Con18 - How to Run a Search Project in SharePoint -  Matthew McDermott
O365Con18 - How to Run a Search Project in SharePoint - Matthew McDermott
 
Old CloudHaven presentation for SW Eng/Comp Sci Students
Old CloudHaven presentation for SW Eng/Comp Sci StudentsOld CloudHaven presentation for SW Eng/Comp Sci Students
Old CloudHaven presentation for SW Eng/Comp Sci Students
 

Similar to #SPFestSEA Introduction to #MicrosoftGraph

Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak
 
Resume - Abhishek Gupt
Resume - Abhishek GuptResume - Abhishek Gupt
Resume - Abhishek Gupt
abhishek gupta
 
Software engineering practices for the data science and machine learning life...
Software engineering practices for the data science and machine learning life...Software engineering practices for the data science and machine learning life...
Software engineering practices for the data science and machine learning life...
DataWorks Summit
 

Similar to #SPFestSEA Introduction to #MicrosoftGraph (20)

#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret deep dive with the #MicrosoftGraph
 
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
#SPFestSea azr302 The SharePoint Framework and the #MicrosoftGraph under ster...
 
Office Add-ins developer community call-July 2019
Office Add-ins developer community call-July 2019Office Add-ins developer community call-July 2019
Office Add-ins developer community call-July 2019
 
SPFestDc AZR204 Microsoft Graph and SharePoint Framework under steroids with ...
SPFestDc AZR204 Microsoft Graph and SharePoint Framework under steroids with ...SPFestDc AZR204 Microsoft Graph and SharePoint Framework under steroids with ...
SPFestDc AZR204 Microsoft Graph and SharePoint Framework under steroids with ...
 
Power Platform Governance
Power Platform GovernancePower Platform Governance
Power Platform Governance
 
Microsoft Graph: The API for Microsoft 365
Microsoft Graph: The API for Microsoft 365Microsoft Graph: The API for Microsoft 365
Microsoft Graph: The API for Microsoft 365
 
Global ai conf_final
Global ai conf_finalGlobal ai conf_final
Global ai conf_final
 
November 2022 CIAOPS Need to Know Webinar
November 2022 CIAOPS Need to Know WebinarNovember 2022 CIAOPS Need to Know Webinar
November 2022 CIAOPS Need to Know Webinar
 
An Introduction to Microsoft Flow
An Introduction to Microsoft FlowAn Introduction to Microsoft Flow
An Introduction to Microsoft Flow
 
Starter Kit for Collaboration from Karuana @ Microsoft IT
Starter Kit for Collaboration from Karuana @ Microsoft ITStarter Kit for Collaboration from Karuana @ Microsoft IT
Starter Kit for Collaboration from Karuana @ Microsoft IT
 
How Celtra Optimizes its Advertising Platform with Databricks
How Celtra Optimizes its Advertising Platformwith DatabricksHow Celtra Optimizes its Advertising Platformwith Databricks
How Celtra Optimizes its Advertising Platform with Databricks
 
Agile IT: Filling in the Gaps in the Azure vs. AWS debate
Agile IT: Filling in the Gaps in the Azure vs. AWS debateAgile IT: Filling in the Gaps in the Azure vs. AWS debate
Agile IT: Filling in the Gaps in the Azure vs. AWS debate
 
15th December 2016 - Microsoft Paddington Vuzion Awareness Event
15th December 2016 - Microsoft Paddington Vuzion Awareness Event15th December 2016 - Microsoft Paddington Vuzion Awareness Event
15th December 2016 - Microsoft Paddington Vuzion Awareness Event
 
SPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDSSPS Vancouver 2018 - What is CDM and CDS
SPS Vancouver 2018 - What is CDM and CDS
 
Sukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud ManagementSukumar Nayak-Agile-DevOps-Cloud Management
Sukumar Nayak-Agile-DevOps-Cloud Management
 
Sai_Resume
Sai_ResumeSai_Resume
Sai_Resume
 
BAKKIYA_4YR
BAKKIYA_4YRBAKKIYA_4YR
BAKKIYA_4YR
 
Resume - Abhishek Gupt
Resume - Abhishek GuptResume - Abhishek Gupt
Resume - Abhishek Gupt
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
 
Software engineering practices for the data science and machine learning life...
Software engineering practices for the data science and machine learning life...Software engineering practices for the data science and machine learning life...
Software engineering practices for the data science and machine learning life...
 

More from Vincent Biret

More from Vincent Biret (20)

#MSGraph introduction at #M365SaturdayOttawa
#MSGraph introduction at #M365SaturdayOttawa#MSGraph introduction at #M365SaturdayOttawa
#MSGraph introduction at #M365SaturdayOttawa
 
#MWCP19 atelier provisionnement #Office365 slides teams
#MWCP19 atelier provisionnement #Office365 slides teams#MWCP19 atelier provisionnement #Office365 slides teams
#MWCP19 atelier provisionnement #Office365 slides teams
 
#MWCP19 atelier provisionnement #Office365 slides introduction
#MWCP19 atelier provisionnement #Office365 slides introduction#MWCP19 atelier provisionnement #Office365 slides introduction
#MWCP19 atelier provisionnement #Office365 slides introduction
 
December #PnP #SPFx call #CLI exteranlize demo
December #PnP #SPFx call #CLI exteranlize demoDecember #PnP #SPFx call #CLI exteranlize demo
December #PnP #SPFx call #CLI exteranlize demo
 
#ESPC19 How to do #DevOps with #SPFx
#ESPC19 How to do #DevOps with #SPFx#ESPC19 How to do #DevOps with #SPFx
#ESPC19 How to do #DevOps with #SPFx
 
#SPSToronto Digital Workplace provisioning with #MicrosoftGraph and #Azure fu...
#SPSToronto Digital Workplace provisioning with #MicrosoftGraph and #Azure fu...#SPSToronto Digital Workplace provisioning with #MicrosoftGraph and #Azure fu...
#SPSToronto Digital Workplace provisioning with #MicrosoftGraph and #Azure fu...
 
#SPSToronto How to do #DevOps with #SPFx and why it matters
#SPSToronto How to do #DevOps with #SPFx and why it matters#SPSToronto How to do #DevOps with #SPFx and why it matters
#SPSToronto How to do #DevOps with #SPFx and why it matters
 
MS365 dev bootcamp - day introduction slides
MS365 dev bootcamp - day introduction slidesMS365 dev bootcamp - day introduction slides
MS365 dev bootcamp - day introduction slides
 
MS365 Dev Bootcamp Montreal 2019 - Microsoft graph introduction
MS365 Dev Bootcamp Montreal 2019 - Microsoft graph introductionMS365 Dev Bootcamp Montreal 2019 - Microsoft graph introduction
MS365 Dev Bootcamp Montreal 2019 - Microsoft graph introduction
 
#MicrosoftGraph Community call - automating your digital workplace provisioni...
#MicrosoftGraph Community call - automating your digital workplace provisioni...#MicrosoftGraph Community call - automating your digital workplace provisioni...
#MicrosoftGraph Community call - automating your digital workplace provisioni...
 
#SPFestSEA Automate digital workplace provisioning with #MicrosoftGraph and #...
#SPFestSEA Automate digital workplace provisioning with #MicrosoftGraph and #...#SPFestSEA Automate digital workplace provisioning with #MicrosoftGraph and #...
#SPFestSEA Automate digital workplace provisioning with #MicrosoftGraph and #...
 
#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2#SPFestSea Introduction to #Azure #Functions v2
#SPFestSea Introduction to #Azure #Functions v2
 
#SPSNYC 2019 Automating your digital workplace provisioning with #MicrosoftGr...
#SPSNYC 2019 Automating your digital workplace provisioning with #MicrosoftGr...#SPSNYC 2019 Automating your digital workplace provisioning with #MicrosoftGr...
#SPSNYC 2019 Automating your digital workplace provisioning with #MicrosoftGr...
 
Groupe usagers SharePoint Quebec Juin 2019 - Nouveautés de dev et évènements
Groupe usagers SharePoint Quebec Juin 2019 - Nouveautés de dev et évènementsGroupe usagers SharePoint Quebec Juin 2019 - Nouveautés de dev et évènements
Groupe usagers SharePoint Quebec Juin 2019 - Nouveautés de dev et évènements
 
#MSBuild using #IoT to improve peoples's health and brain power
#MSBuild using #IoT to improve peoples's health and brain power#MSBuild using #IoT to improve peoples's health and brain power
#MSBuild using #IoT to improve peoples's health and brain power
 
#SPFestDC Automate your digital workplace provisioning with #Microsoft Graph ...
#SPFestDC Automate your digital workplace provisioning with #Microsoft Graph ...#SPFestDC Automate your digital workplace provisioning with #Microsoft Graph ...
#SPFestDC Automate your digital workplace provisioning with #Microsoft Graph ...
 
#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting started#SPFestDC #Azure #Functions V2: What's new and getting started
#SPFestDC #Azure #Functions V2: What's new and getting started
 
#SPFestDC Migrate your custom solutions to the modern stack
#SPFestDC Migrate your custom solutions to the modern stack#SPFestDC Migrate your custom solutions to the modern stack
#SPFestDC Migrate your custom solutions to the modern stack
 
#SPSHouston Automating your digital workplace proivisioning with #Azure Durab...
#SPSHouston Automating your digital workplace proivisioning with #Azure Durab...#SPSHouston Automating your digital workplace proivisioning with #Azure Durab...
#SPSHouston Automating your digital workplace proivisioning with #Azure Durab...
 
Microsoft #ignite tour #toronto 2019 How to do #DevOps with the #SPFx and why...
Microsoft #ignite tour #toronto 2019 How to do #DevOps with the #SPFx and why...Microsoft #ignite tour #toronto 2019 How to do #DevOps with the #SPFx and why...
Microsoft #ignite tour #toronto 2019 How to do #DevOps with the #SPFx and why...
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

#SPFestSEA Introduction to #MicrosoftGraph

  • 1. Introduction to the Microsoft Graph : Getting Started Quickly & Getting the Most Out of It SharePoint Fest Seattle 2019 Vincent Biret
  • 2. Passionate about technologies, development and community Vincent Biret @baywet bit.ly/vince365 Microsoft Office Dev MVP Azure and Office 365 developer @ 2toLead
  • 4. Agenda •Introduction to the Microsoft Graph •Authentication & authorization •Azure Functions •Tips •Conclusion
  • 7. Regardless of your development model, the Microsoft Graph grants access to a wealth of data Your gateway to Microsoft 365 Your app Gateway Your data or your customer’s Office 365 Windows 10 Enterprise Mobility and Security 1Microsoft Graph
  • 8. The Microsoft Graph provides a unified auth model and set of API’s for both pro and personal accounts/data Personal and professional accounts (lucy)
  • 9. The Microsoft Graph is the fastest growing API at Microsoft Some numbers 18TNodes 181Countries 1BMonthly active apps 90%F500 companies have data available via Microsoft Graph 180MMonthly active users in Microsoft 365 100BRequests each month
  • 10. https://graph.microsoft.com Microsoft Graph started with Office 365 and became THE API for enterprise and personal data What data is available? Users, Groups, Organizations Outlook SharePoint OneDrive Teams Planner Excel OneNote Activities Devices relays Commands Notifications Azure AD Intune Identity Manager Advanced Threat Analytics Advanced Threat Protection Email, Calendar, Contacts and Tasks Sites and Lists Disks and Files Channels, Messages Tasks and Plans Worksheets Notes, and more… Identity management Access control Synchronization Domains Organizational units Applications and Devices Threats analysis Threats protection Alerts Policies And more… Office 365 Windows 10 Enterprise mobility and security Dynamics 365 Finances
  • 11. One of the key points of the Microsoft Graph is providing a unified data model Wide and transversal API SITES GROUPS USERSINSIGHTS CONTACTS PEOPLE ORGANIZATION EMAIL CONTENT DOCUMENTS DEVICES TEAMS REPORTS ME ADMIN UNITS ROLES APPS SECURITY DATA & AUTOMATION ORGANIZATION USERS BUSINESS PARTNER
  • 12. Microsoft provides a consistent approach to the API Basics • HTTP verbs represent the intent: GET | POST | PATCH | PUT | DELETE • Version: /v1.0 or /beta • Resource: /users, /groups, /sites, /drives, /devices, … • Collection item: /users/john • Property: /users/john/department • Linked data via navigation: /users/john/events • Query parameters: /users/john/events?$top=5 o Format: $select | $orderby o Filter/Navigate: $filter | $expand o Pagination: $top | $skip | $skiptoken /{version} ?{parameters}/{resource}/{id}/{property}
  • 13. Various supported languages and platforms SDKs Generally Available ( /v1.0 ) Preview ( /beta ) And Soon
  • 14. Documentation, samples, quick starts and asking for help Demo
  • 16. Resources provided by the Graph are always secured. Depending on the authentication flow, you might need multiple tokens. Base principles access_token MSAL or ADAL Your APP Microsoft Graph id_token access_token refresh_token Microsoft Identity
  • 17. It is crucial to think through your auth scenario before starting development as it has a deep impact. Contexts types Users can consent for their data, admins for the whole tenant Only admins can consent Delegated permissions User’s privileges App permissions Permission Type: applicationPermission Type: Delegated Access as a user Access as a service Effective PermissionsEffective Permissions
  • 18. Permissions follow a description model. Tip: always request the least permissions Permissions/scopes structure specific: .All, .Shared, etc Read, ReadWrite, etc. Target Entity: files, mail, groups, calendars, etc… Ex: User.Read Directory.ReadWrite.All Resource Action Scope
  • 19. Microsoft has been working really hard to improve the situation. This is why it’s important to think your auth. Complex situation Your target audience ADALSDK Client App Reg. MSAL Endpoint
  • 22. Improving the « pay for what you use » and the elasticity principles, it also provides a total abstraction of servers Serverless definition
  • 23. Enable your team to deliver solutions faster, in a more structured way moving the focus on the business logic Benefits
  • 24. Google Cloud Functions and AWS Lambdas are direct competitors of Azure Functions Offerings
  • 25. 5 languages supported for production in Azure Functions and more to come Languages (v2)
  • 26. Solution “I’m sick boss” Demo
  • 27. Tips
  • 28. Microsoft is trying to improve your Graph dev experience $whatif • Simply add $whatif at the end of a request to know where the data is coming from • Useful when debugging • /me/?$whatif { "Description": "Execute HTTP request", "Uri": "https://graph.windows.net/v2/c03a026e-335e-458c-bad2- 3309fe59663b/users('c9452811-4b6e-4073-b7cf- 3f681f55539b')?$select=businessPhones,displayName,givenName,jobTitle,mail,mobi lePhone,officeLocation,preferredLanguage,surname,userPrincipalName,id", "HttpMethod": "GET" }
  • 29. A good knowledge of OData is key to build applications properly, even when using SDKs Know your OData! • Sets • $count • $filter • $expand • $orderby • $select • $skip/$skipToken • $top • Search • $search • Values • $ref • $value
  • 30. Microsoft must define boundaries to keep the service up and running. This sandbox is defined at multiple levels and revolves around multiple concepts which makes the problem more complex. Throttling – the problem • Microsoft 365 is a set of services, usage always limited • Relies on limited and costly resources (CPU, mmory, storage…) • These limits can be dynamic or fixed • API usage is dynamic • Site collection storage is fixed • You can expand the boundaries: type and/or number of licenses • API usage limitation is defined per user (to start with) • This limits impact on the service, users and revenue
  • 31. The idea is to limit resource usage, spread out pic activity, allow key features to survive by stopping minor features using the same resource or even tell users to slow down before everything stops. Throttling – what can you do? • Implement read cache (if possible) • In proc, in memory, distributed cache (Redis) • Pay attention to Rate-Limit Limit, Remaining, and Reset headers • Pay attention to 429’s or 503’s and impl. « exponential back-off retry policies»* • Or better, retry after the delay provided by retry-after header • Implement “Circuit Breaker” design pattern • Limit incoming traffic using telemetry
  • 33. All these developer productivity improvements translate to savings in development investments and better productivity for end users which means better ROI! Conclusion •Great potential •Consistent API •Auth design is key •Functions are here to help •Shorter delivery time •Better apps integration •Better user experience
  • 34. Check out these sessions to learn more about the Microsoft Graph To go further • 6 demos to impress your boss/customers with Microsoft Graph • Jeremy Take AZR104 room 604 3PM • Automating Provisioning for Your digital workplace : With Graph and Azure Durable Functions • Vincent Biret AZR303 room 604 Friday 3PM
  • 35. Bit.ly/vince365 @baywet slideshare.net/VincentBIRET Thanks!/Questions? Vincent Biret Office 365 and Azure Developer, 2toLead @baywet Bit.ly/vince365

Editor's Notes

  1. Mostly for devs and architects, as it’s intro level it might interest nontechnical people whom want to get a grasp
  2. Gestion des questions, interaction, ok avec ce programme?
  3. Parler des insights aussi grâce à l’abondance des données
  4. https://github.com/microsoftgraph 
  5. + Stack overflow, github…
  6. Client credential flow: service can identify itself without impersonation (service account scenario) On behalf flow: an app, in a given context, can relay its authentication to a trusted API in order to represent the app and the user, not only the application. On behalf flow will help office add-ins accessing secured APIs https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-limitations https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-compare https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-service-to-service https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of https://myignite.microsoft.com/sessions/55110?source=sessions
  7. Show aad.portal.azure.com, explain it’s the latest and greatest and Microsoft has almost updated all the samples. People should use it moving forward
  8. https://cloud.google.com/functions/ https://aws.amazon.com/lambda/ https://azure.microsoft.com/en-us/services/functions/
  9. https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions
  10. https://developer.microsoft.com/en-us/graph/docs/concepts/query_parameters
  11. https://developer.microsoft.com/en-us/graph/docs/concepts/throttling https://docs.microsoft.com/en-us/azure/architecture/patterns/throttling https://blogs.msdn.microsoft.com/exchangedev/2017/04/07/throttling-coming-to-outlook-api-and-microsoft-graph/ https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/32797489-consistent-retry-after-information-accross-differe https://www.martinfowler.com/bliki/CircuitBreaker.html
  12. Money save = dev time saved, less support to provide, better product/service