SlideShare a Scribd company logo
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.
@dkershaw_msft
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.
your
Your app
Gateway
Your or your
customer’s
data
Office 365 Windows 10 Enterprise Mobility + Security
1Microsoft Graph
Get to know the API
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.
prepared
Graph uses server-
side page size limits
When querying
collections, Graph
may return the results
in many pages
Always expect an
@odata.nextLink
property in the response
Contains the URL to the next page
1.
Always handle the
possibility that the
responses are paged
in nature
2.
Follow the
@odata.nextLink
to obtain the next
page of results
3.
Final page will not
contain an
@odata.nextLink
property
4.
Treat the entire URL
as an opaque string
Error Best practice
403 How did this happen? My application got consent!
The signed-in user does not have privileges to access the resource requested.
Tip: Provide a generic "Access denied" error back to the signed-in user.
404 How did this happen? I just got this resource!
Resource not yet provisioned (like a user's photo)
Resource has been deleted
Tip: Watch for restore - your application should also take this into account.
429 Your app should always be prepared to be throttled.
Tip: Honor the HTTP Retry-After response header to recover
Tip: Rate limit to stay below throttle limits
503 Service is busy
Tip: Retry – but employ a back-off strategy similar to 429
Tip: Additionally, always make new retry requests over a new HTTP connection
Retry logic for
transient errors
Storing data locally in
your application
required
terms of service
privacy policy
retention
deletion policies
Optimizations
Use projections
GET ?
$select=givenName,mail
Choose the properties
your app really needs
and no more
Don’t send
unnecessary data
over the wire
Tip
Use $select
Use filters
GET ?
$filter=department eq ‘Sales’ & $select=givenName,mail
Choose the records your
app really needs and no
more
Don’t send
unnecessary data
over the wire
Tip
Use $filter
POST/PATCH/PUT
If your code doesn’t need
to get a response, then
opt out
Don’t send
unnecessary data
over the wire
Tip
Use HTTP
Prefer return=minimal
request header
Webhooks
Scenario
Application needs to know
about changes to data – like
deleted users
Tips
Use webhook notifications whenever
data of interest has changed
Put notifications in a queue for later
processing
Why
Avoid computationally
expensive and excessive
polling
Delta query
Scenario
Need to cache or store Microsoft
Graph data locally, and keep that
data up to date, or track changes
to data for any other reasons
Tip
Use delta query
Why
Stop retrieving data your application already has!
Minimizes network traffic
Reduces the likelihood of reaching a throttling
threshold
Webhooks Delta query
Scenario
Same scenarios as before,
but if you need to
optimize further…
Tips
Use webhook notifications as the
trigger to make delta query calls
Put notifications in a queue for later
processing
Why
Difficult to figure out optimal
polling interval
THR2436 Barracuda Sentinel: Microsoft Graph powered AI for real-time cyber
fraud defense
Batching
Scenario
Mobile client app needs to get
signed-in user’s profile AND
avatar
Tip
Use JSON batching
Why
Performance gains through multiplexing
Save the application significant network latency
Conserves connection resources
Lower bandwidth consumption
best practices
https://aka.ms/graphBestPractices
influence our roadmap
User Voice
Related sessions
BRK2409 Leveraging SharePoint as a development platform for the
modern intranet
Tue 4:45
BRK2406 Coding Enterprise Apps for Intune – Protected, Secured &
Integrated
Wed 8:30
BRK2410 Data-Driven and User-Centric: Improving enterprise productivity
and engagement through graph powered notifications
Wed 4:30
THR3304 Cognitive Services + Microsoft Graph Tue 5:30
THR2430 Intelligent Edge: Microsoft Graph and IoT Wed 9:00
THR2413 Bots + Teams + Microsoft Graph: the perfect combo to help
manage your calendar
Wed 11:00
THR3302 Azure Functions and Microsoft Graph Wed 12:30
THR2436 Barracuda Sentinel: Microsoft Graph powered AI for real-time
cyber fraud defense
Wed 1:00
THR2437 Smart UI with Adaptive Cards, Microsoft Graph and beyond Wed 2:00
TSP2013 Microsoft Graph Device Remote Sessions Wed 3:30
WRK2510 Build intelligent intranet portals with SharePoint Wed 4:00
https://graph.microsoft.com
Twitter
#MicrosoftGraph
GitHub
/MicrosoftGraph
StackOverflow
[MicrosoftGraph]
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.
Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.

More Related Content

What's hot (20)

PPTX
An introduction of cloud storage
Wenbin Zhao
 
PPTX
Introduction to the world of Cloud Computing & Microsoft Azure.pptx
PrazolBista
 
PPTX
Cloud Capabilities Slide Deck
Avalaunch Media
 
PPTX
Cloud Infrastructure.pptx
Vivek Shelke
 
PPTX
Cloud computing
ČhauÐhařÿ Faísal Ãlï
 
PPTX
Comparison of Cloud Providers
Sabapathy Murthi
 
PPTX
Voice Technology
jaclynne
 
PPTX
Microsoft Defender for Endpoint
Cheah Eng Soon
 
PPTX
Azure DevOps AI
AayushAayush16
 
PPTX
Cloud Computing.pptx
Subid Biswas
 
DOCX
Fog Computing and Cloud Computing
Ahmed Banafa
 
DOCX
Full report on light peak technology
VIKAS SINGH BHADOURIA
 
PDF
Cloud Computing and Its Service Models
Tyrone Systems
 
PDF
5G and IoT Security
NUS-ISS
 
PPTX
SEC302-S-143971-AWS-Prismacloud.pptx
DubemJavapi
 
PDF
6G Technology
IRJET Journal
 
PDF
The Layman's Guide to Microsoft Azure
Aptera Inc
 
PPT
What Is Cloud Computing
Lisa Tomberlin Copeland
 
PDF
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Edureka!
 
PPTX
Aviatrix_and_CheckPoint_Cloudmates_Apr_2021.pptx
jopivihine
 
An introduction of cloud storage
Wenbin Zhao
 
Introduction to the world of Cloud Computing & Microsoft Azure.pptx
PrazolBista
 
Cloud Capabilities Slide Deck
Avalaunch Media
 
Cloud Infrastructure.pptx
Vivek Shelke
 
Comparison of Cloud Providers
Sabapathy Murthi
 
Voice Technology
jaclynne
 
Microsoft Defender for Endpoint
Cheah Eng Soon
 
Azure DevOps AI
AayushAayush16
 
Cloud Computing.pptx
Subid Biswas
 
Fog Computing and Cloud Computing
Ahmed Banafa
 
Full report on light peak technology
VIKAS SINGH BHADOURIA
 
Cloud Computing and Its Service Models
Tyrone Systems
 
5G and IoT Security
NUS-ISS
 
SEC302-S-143971-AWS-Prismacloud.pptx
DubemJavapi
 
6G Technology
IRJET Journal
 
The Layman's Guide to Microsoft Azure
Aptera Inc
 
What Is Cloud Computing
Lisa Tomberlin Copeland
 
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
Edureka!
 
Aviatrix_and_CheckPoint_Cloudmates_Apr_2021.pptx
jopivihine
 

Similar to Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable. (20)

PPTX
Microsoft Graph: Connect to essential data every app needs
Microsoft Tech Community
 
PPTX
Microsoft Graph: Connect to essential data every app needs
Microsoft Tech Community
 
PPTX
An introduction to Microsoft Graph for developers
Microsoft 365 Developer
 
PPTX
#SPSOttawa introduction to the #microsoftGraph
Vincent Biret
 
PPTX
ATD 13 - Enhancing your applications using Microsoft Graph API
Dragan Panjkov
 
PPTX
Microsoft Graph
Becky Bertram
 
PPTX
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
Sébastien Levert
 
PPTX
#SPFestSEA Introduction to #MicrosoftGraph
Vincent Biret
 
PPTX
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
Sébastien Levert
 
PPSX
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Nilesh Shah
 
PDF
Create cross-platform apps that interact with Microsoft Graph and Office 365 ...
Codemotion
 
PDF
Xamarin microsoft graph
Nicolò Carandini
 
PPTX
Microsoft Graph community call - April, 2018
Microsoft 365 Developer
 
PPTX
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
Sébastien Levert
 
PPTX
Introduction to graph services
Dipti Chhatrapati
 
PPTX
SharePoint Fest Seattle 2017 - Everything your need to know about the Microso...
Sébastien Levert
 
PDF
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
NCCOMMS
 
PPTX
Microsoft Graph Community call 1-2-18
Microsoft 365 Developer
 
PDF
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
European Collaboration Summit
 
PPTX
Microsoft Graph: The API for Microsoft 365
Mayur Tendulkar
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Tech Community
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Tech Community
 
An introduction to Microsoft Graph for developers
Microsoft 365 Developer
 
#SPSOttawa introduction to the #microsoftGraph
Vincent Biret
 
ATD 13 - Enhancing your applications using Microsoft Graph API
Dragan Panjkov
 
Microsoft Graph
Becky Bertram
 
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
Sébastien Levert
 
#SPFestSEA Introduction to #MicrosoftGraph
Vincent Biret
 
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
Sébastien Levert
 
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Nilesh Shah
 
Create cross-platform apps that interact with Microsoft Graph and Office 365 ...
Codemotion
 
Xamarin microsoft graph
Nicolò Carandini
 
Microsoft Graph community call - April, 2018
Microsoft 365 Developer
 
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
Sébastien Levert
 
Introduction to graph services
Dipti Chhatrapati
 
SharePoint Fest Seattle 2017 - Everything your need to know about the Microso...
Sébastien Levert
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
NCCOMMS
 
Microsoft Graph Community call 1-2-18
Microsoft 365 Developer
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
European Collaboration Summit
 
Microsoft Graph: The API for Microsoft 365
Mayur Tendulkar
 
Ad

More from Microsoft Tech Community (20)

PPTX
100 ways to use Yammer
Microsoft Tech Community
 
PPTX
10 Yammer Group Suggestions
Microsoft Tech Community
 
PPTX
Removing Security Roadblocks to IoT Deployment Success
Microsoft Tech Community
 
PPTX
Building mobile apps with Visual Studio and Xamarin
Microsoft Tech Community
 
PPTX
Interactive emails in Outlook with Adaptive Cards
Microsoft Tech Community
 
PPTX
Unlocking security insights with Microsoft Graph API
Microsoft Tech Community
 
PPTX
Break through the serverless barriers with Durable Functions
Microsoft Tech Community
 
PPTX
Multiplayer Server Scaling with Azure Container Instances
Microsoft Tech Community
 
PPTX
Explore Azure Cosmos DB
Microsoft Tech Community
 
PPTX
Media Streaming Apps with Azure and Xamarin
Microsoft Tech Community
 
PPTX
DevOps for Data Science
Microsoft Tech Community
 
PPTX
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Microsoft Tech Community
 
PPTX
Azure Functions and Microsoft Graph
Microsoft Tech Community
 
PPTX
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Microsoft Tech Community
 
PPTX
Getting Started with Visual Studio Tools for AI
Microsoft Tech Community
 
PPTX
Using AML Python SDK
Microsoft Tech Community
 
PPTX
Mobile Workforce Location Tracking with Bing Maps
Microsoft Tech Community
 
PPTX
Cognitive Services Labs in action Anomaly detection
Microsoft Tech Community
 
PPTX
Speech Devices SDK
Microsoft Tech Community
 
PPTX
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
Microsoft Tech Community
 
100 ways to use Yammer
Microsoft Tech Community
 
10 Yammer Group Suggestions
Microsoft Tech Community
 
Removing Security Roadblocks to IoT Deployment Success
Microsoft Tech Community
 
Building mobile apps with Visual Studio and Xamarin
Microsoft Tech Community
 
Interactive emails in Outlook with Adaptive Cards
Microsoft Tech Community
 
Unlocking security insights with Microsoft Graph API
Microsoft Tech Community
 
Break through the serverless barriers with Durable Functions
Microsoft Tech Community
 
Multiplayer Server Scaling with Azure Container Instances
Microsoft Tech Community
 
Explore Azure Cosmos DB
Microsoft Tech Community
 
Media Streaming Apps with Azure and Xamarin
Microsoft Tech Community
 
DevOps for Data Science
Microsoft Tech Community
 
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Microsoft Tech Community
 
Azure Functions and Microsoft Graph
Microsoft Tech Community
 
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Microsoft Tech Community
 
Getting Started with Visual Studio Tools for AI
Microsoft Tech Community
 
Using AML Python SDK
Microsoft Tech Community
 
Mobile Workforce Location Tracking with Bing Maps
Microsoft Tech Community
 
Cognitive Services Labs in action Anomaly detection
Microsoft Tech Community
 
Speech Devices SDK
Microsoft Tech Community
 
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
Microsoft Tech Community
 
Ad

Recently uploaded (20)

PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
July Patch Tuesday
Ivanti
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Python basic programing language for automation
DanialHabibi2
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
July Patch Tuesday
Ivanti
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 

Best practices with Microsoft Graph: Making your applications more performant, resilient, and reliable.

  • 4. your Your app Gateway Your or your customer’s data Office 365 Windows 10 Enterprise Mobility + Security 1Microsoft Graph
  • 5. Get to know the API
  • 8. Graph uses server- side page size limits When querying collections, Graph may return the results in many pages Always expect an @odata.nextLink property in the response Contains the URL to the next page
  • 9. 1. Always handle the possibility that the responses are paged in nature 2. Follow the @odata.nextLink to obtain the next page of results 3. Final page will not contain an @odata.nextLink property 4. Treat the entire URL as an opaque string
  • 10. Error Best practice 403 How did this happen? My application got consent! The signed-in user does not have privileges to access the resource requested. Tip: Provide a generic "Access denied" error back to the signed-in user. 404 How did this happen? I just got this resource! Resource not yet provisioned (like a user's photo) Resource has been deleted Tip: Watch for restore - your application should also take this into account. 429 Your app should always be prepared to be throttled. Tip: Honor the HTTP Retry-After response header to recover Tip: Rate limit to stay below throttle limits 503 Service is busy Tip: Retry – but employ a back-off strategy similar to 429 Tip: Additionally, always make new retry requests over a new HTTP connection
  • 12. Storing data locally in your application required terms of service privacy policy retention deletion policies
  • 14. Use projections GET ? $select=givenName,mail Choose the properties your app really needs and no more Don’t send unnecessary data over the wire Tip Use $select
  • 15. Use filters GET ? $filter=department eq ‘Sales’ & $select=givenName,mail Choose the records your app really needs and no more Don’t send unnecessary data over the wire Tip Use $filter
  • 16. POST/PATCH/PUT If your code doesn’t need to get a response, then opt out Don’t send unnecessary data over the wire Tip Use HTTP Prefer return=minimal request header
  • 17. Webhooks Scenario Application needs to know about changes to data – like deleted users Tips Use webhook notifications whenever data of interest has changed Put notifications in a queue for later processing Why Avoid computationally expensive and excessive polling
  • 18. Delta query Scenario Need to cache or store Microsoft Graph data locally, and keep that data up to date, or track changes to data for any other reasons Tip Use delta query Why Stop retrieving data your application already has! Minimizes network traffic Reduces the likelihood of reaching a throttling threshold
  • 19. Webhooks Delta query Scenario Same scenarios as before, but if you need to optimize further… Tips Use webhook notifications as the trigger to make delta query calls Put notifications in a queue for later processing Why Difficult to figure out optimal polling interval THR2436 Barracuda Sentinel: Microsoft Graph powered AI for real-time cyber fraud defense
  • 20. Batching Scenario Mobile client app needs to get signed-in user’s profile AND avatar Tip Use JSON batching Why Performance gains through multiplexing Save the application significant network latency Conserves connection resources Lower bandwidth consumption
  • 23. Related sessions BRK2409 Leveraging SharePoint as a development platform for the modern intranet Tue 4:45 BRK2406 Coding Enterprise Apps for Intune – Protected, Secured & Integrated Wed 8:30 BRK2410 Data-Driven and User-Centric: Improving enterprise productivity and engagement through graph powered notifications Wed 4:30 THR3304 Cognitive Services + Microsoft Graph Tue 5:30 THR2430 Intelligent Edge: Microsoft Graph and IoT Wed 9:00 THR2413 Bots + Teams + Microsoft Graph: the perfect combo to help manage your calendar Wed 11:00 THR3302 Azure Functions and Microsoft Graph Wed 12:30 THR2436 Barracuda Sentinel: Microsoft Graph powered AI for real-time cyber fraud defense Wed 1:00 THR2437 Smart UI with Adaptive Cards, Microsoft Graph and beyond Wed 2:00 TSP2013 Microsoft Graph Device Remote Sessions Wed 3:30 WRK2510 Build intelligent intranet portals with SharePoint Wed 4:00

Editor's Notes