SlideShare a Scribd company logo
1 of 27
@dkershaw_msft
your
Your app
Gateway
Your or your
customer’s
data
Office 365 Windows 10 Enterprise Mobility + Security
1Microsoft Graph
Get to know the API
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

CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
Databricks
 

What's hot (20)

Grafana.pptx
Grafana.pptxGrafana.pptx
Grafana.pptx
 
CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
CERN’s Next Generation Data Analysis Platform with Apache Spark with Enric Te...
 
Apache Kafka vs RabbitMQ: Fit For Purpose / Decision Tree
Apache Kafka vs RabbitMQ: Fit For Purpose / Decision TreeApache Kafka vs RabbitMQ: Fit For Purpose / Decision Tree
Apache Kafka vs RabbitMQ: Fit For Purpose / Decision Tree
 
Airbyte @ Airflow Summit - The new modern data stack
Airbyte @ Airflow Summit - The new modern data stackAirbyte @ Airflow Summit - The new modern data stack
Airbyte @ Airflow Summit - The new modern data stack
 
Building Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache SparkBuilding Robust ETL Pipelines with Apache Spark
Building Robust ETL Pipelines with Apache Spark
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
user Behavior Analysis with Session Windows and Apache Kafka's Streams API
user Behavior Analysis with Session Windows and Apache Kafka's Streams APIuser Behavior Analysis with Session Windows and Apache Kafka's Streams API
user Behavior Analysis with Session Windows and Apache Kafka's Streams API
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
 
Upgrade Without the Headache: Best Practices for Upgrading Hadoop in Production
Upgrade Without the Headache: Best Practices for Upgrading Hadoop in ProductionUpgrade Without the Headache: Best Practices for Upgrading Hadoop in Production
Upgrade Without the Headache: Best Practices for Upgrading Hadoop in Production
 
The Log of All Logs: Raft-based Consensus Inside Kafka | Guozhang Wang, Confl...
The Log of All Logs: Raft-based Consensus Inside Kafka | Guozhang Wang, Confl...The Log of All Logs: Raft-based Consensus Inside Kafka | Guozhang Wang, Confl...
The Log of All Logs: Raft-based Consensus Inside Kafka | Guozhang Wang, Confl...
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Introduction to Apache NiFi dws19 DWS - DC 2019
Introduction to Apache NiFi   dws19 DWS - DC 2019Introduction to Apache NiFi   dws19 DWS - DC 2019
Introduction to Apache NiFi dws19 DWS - DC 2019
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
Integrating NiFi and Flink
Integrating NiFi and FlinkIntegrating NiFi and Flink
Integrating NiFi and Flink
 
Building Event Streaming Architectures on Scylla and Kafka
Building Event Streaming Architectures on Scylla and KafkaBuilding Event Streaming Architectures on Scylla and Kafka
Building Event Streaming Architectures on Scylla and Kafka
 
Real-time Analytics with Trino and Apache Pinot
Real-time Analytics with Trino and Apache PinotReal-time Analytics with Trino and Apache Pinot
Real-time Analytics with Trino and Apache Pinot
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction Log
 
Parallelization of Structured Streaming Jobs Using Delta Lake
Parallelization of Structured Streaming Jobs Using Delta LakeParallelization of Structured Streaming Jobs Using Delta Lake
Parallelization of Structured Streaming Jobs Using Delta Lake
 

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

Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
Vishwanath Ramdas
 
Developing Profitable APIs - John Fraser - Platform A
Developing Profitable APIs - John Fraser - Platform ADeveloping Profitable APIs - John Fraser - Platform A
Developing Profitable APIs - John Fraser - Platform A
auexpo Conference
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier Architecture
Webx
 
Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone Developer
Sam Basu
 
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
Fernando Galdino
 
W-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database PerformanceW-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database Performance
Alois Reitbauer
 
Lead Allocation System - Attribute Driven Design (ADD)
Lead Allocation System - Attribute Driven Design (ADD)Lead Allocation System - Attribute Driven Design (ADD)
Lead Allocation System - Attribute Driven Design (ADD)
Amin Bandeali
 

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

Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
 
IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentation
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
 
Developing Profitable APIs - John Fraser - Platform A
Developing Profitable APIs - John Fraser - Platform ADeveloping Profitable APIs - John Fraser - Platform A
Developing Profitable APIs - John Fraser - Platform A
 
KMS (1)
KMS (1)KMS (1)
KMS (1)
 
3 Tier Architecture
3  Tier Architecture3  Tier Architecture
3 Tier Architecture
 
Fanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone DeveloperFanug - Pragmatic Windows Phone Developer
Fanug - Pragmatic Windows Phone Developer
 
Leveraging The Cloud In 2009
Leveraging The Cloud In 2009Leveraging The Cloud In 2009
Leveraging The Cloud In 2009
 
Web engineering
Web engineeringWeb engineering
Web engineering
 
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
 
Oracle Coherence: in-memory datagrid
Oracle Coherence: in-memory datagridOracle Coherence: in-memory datagrid
Oracle Coherence: in-memory datagrid
 
Porting an Open Source Lp Solver to Web Assembly
 Porting an Open Source Lp Solver to Web Assembly Porting an Open Source Lp Solver to Web Assembly
Porting an Open Source Lp Solver to Web Assembly
 
Secret Web Performance Metric - DevDayBe
Secret Web Performance Metric - DevDayBeSecret Web Performance Metric - DevDayBe
Secret Web Performance Metric - DevDayBe
 
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
 
W-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database PerformanceW-JAX Performance Workshop - Database Performance
W-JAX Performance Workshop - Database Performance
 
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
Kafka error handling patterns and best practices | Hemant Desale and Aruna Ka...
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
Lead Allocation System - Attribute Driven Design (ADD)
Lead Allocation System - Attribute Driven Design (ADD)Lead Allocation System - Attribute Driven Design (ADD)
Lead Allocation System - Attribute Driven Design (ADD)
 
Secret Performance Metric - Armada JS.pdf
Secret Performance Metric - Armada JS.pdfSecret Performance Metric - Armada JS.pdf
Secret Performance Metric - Armada JS.pdf
 
The Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web ServiceThe Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web Service
 

More from Microsoft Tech Community

More from Microsoft Tech Community (20)

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

Recently uploaded

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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+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@
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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...
 
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
 
+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 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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

  • 1.
  • 3.
  • 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
  • 6.
  • 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

  1. 24