SlideShare a Scribd company logo

Microsoft Graph API with OutSystems Event Subscriptions

Slide deck for my third webinar on Microsoft Graph API with OutSystems. In this part we talk about Event subscriptions and handling.

1 of 16
Download to read offline
Microsoft Graph API with
OutSystems
Event Subscriptions
Subscribe and handle Microsoft Graph API
change notifications in your application
February 8thth 11am (CET)
Stefan Weber
Senior Director Software Development
Telelink Business Services Germany GmbH
OutSystems MVP – AWS Community Builder
Fundamentals
 Overview of Microsoft Graph API subscriptions
 Basic Notifications and Rich Notifications
 Subscription Lifecycle
 Best Practices
Agenda
Implementation
 Prerequisites
 Entra Application Registration and Permissions
 OAuth access token client credential flow
 Subscribe and handle basic notifications
 Handle lifecycle events
 Subscribe and handle rich notifications
Previous Webinars on Microsoft Graph API with OutSystems
Application Permissions
Query Microsoft Graph API with application permissions.
Demonstration on how to acquire an access token from
Microsoft Entra with an OAuth client credentials flow.
https://youtu.be/yVK8WQz5qnU
Delegated Permissions
Query Microsoft Graph API with delegated (user) permissions.
Demonstration on how to acquire an access token from
Microsoft Entra with an OAuth authorization code flow.
https://youtu.be/2cSsg5ws1H4
Microsoft Graph API Event
Subscription
Microsoft Graph API event subscriptions allow you to subscribe to
changes in resources such as messages, calendars, and contacts
in Microsoft Graph. When a change occurs, the API sends a
notification to the subscribed application.
To create a subscription you must specify an event type – e.g.
create – and a resource using an application or delegated access
token with corresponding permissions (Scopes).
Subscriptions expire and get deleted automatically on
 Individual subscription expiry
 Resource subscription lifetime limit
 Access Token used for subscribing expires
if Lifecycle Notifications are not handled by your application.
Basic Notifications
A basic notifications only returns the event type and the
affected resource identifier back to your application.
In order to get the details of the affected resource you must
perform a Graph API query.
It is the easiest way to get started with Microsoft Graph API event
subscriptions.
Resource Events
Rich Notifications
Rich Notifications include the affected resource data besides the
event type and the resource identifier.
Resource data in Rich Notifications is encrypted by a Public Key
you must include when subscribing to an event and you need
the corresponding Private Key to decrypt the resource data.
You must specify explicitly which attributes should be
transported as encrypted resource data.
Lifecycle Events
Missed
Notification to your lifecycle events
endpoint on non-delivered event e.g.
because of Timeout.
Actions to take
 Acknowledge event by returning a
status code of 202 – Accepted
 Query the resource or perform a
delta query to take further action
Applicable only to Outlook Messages,
Events and Personal Contacts.
Subscription Removed
Triggered whenever a subscription is
removed from Microsoft Graph.
Applicable only to Outlook Messages,
Events and Contacts and Teams Chat
Messages.
Reauthorization Required
This events hits your lifecycle events
endpoint when
 The access token is about to
expire
 The subscription is about to expire
 A tenant administrator revoked
permissions for your application
Actions to take
 Acknowledge event by returning a
status code of 202 – Accepted
 Reauthorize and update
subscription

Recommended

Microsoft Graph API Webinar Application Permissions
Microsoft Graph API Webinar Application PermissionsMicrosoft Graph API Webinar Application Permissions
Microsoft Graph API Webinar Application PermissionsStefan Weber
 
Microsoft graph and power platform champ
Microsoft graph and power platform   champMicrosoft graph and power platform   champ
Microsoft graph and power platform champKumton Suttiraksiri
 
An introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developersAn introduction to Microsoft Graph for developers
An introduction to Microsoft Graph for developersMicrosoft 365 Developer
 
#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 ...Vincent Biret
 
#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...Vincent Biret
 
Azure from scratch part 2 By Girish Kalamati
Azure from scratch part 2 By Girish KalamatiAzure from scratch part 2 By Girish Kalamati
Azure from scratch part 2 By Girish KalamatiGirish Kalamati
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsStefan Weber
 
Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...CoLaboraDK
 

More Related Content

Similar to Microsoft Graph API with OutSystems Event Subscriptions

Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Peter Selch Dahl
 
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...Nuno Árias Silva
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
 
Microsoft identity manoj mittal
Microsoft identity manoj mittalMicrosoft identity manoj mittal
Microsoft identity manoj mittalManoj Mittal
 
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET CoreVladimir Bychkov
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformMicrosoft 365 Developer
 
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...
CoLabora March 2022 -  Improve security posture by implementing new Azure AD ...CoLabora March 2022 -  Improve security posture by implementing new Azure AD ...
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...Peter Selch Dahl
 
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...Nuno Árias Silva
 
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...Vincent Biret
 
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech Talks
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech TalksDeep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech Talks
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech TalksAmazon Web Services
 
24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdfTomasz Kopacz
 
Azure AD B2C Webinar Series: Custom Policies Part 1
Azure AD B2C Webinar Series: Custom Policies Part 1Azure AD B2C Webinar Series: Custom Policies Part 1
Azure AD B2C Webinar Series: Custom Policies Part 1Vinu Gunasekaran
 
Display Microsoft Teams status on your smart light
Display Microsoft Teams status on your smart lightDisplay Microsoft Teams status on your smart light
Display Microsoft Teams status on your smart lightMohamed Ashiq Faleel
 
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Amazon Web Services
 
Implement Authorization in your Apps with Microsoft identity platform-June 2020
Implement Authorization in your Apps with Microsoft identity platform-June 2020Implement Authorization in your Apps with Microsoft identity platform-June 2020
Implement Authorization in your Apps with Microsoft identity platform-June 2020Microsoft 365 Developer
 
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Amazon Web Services
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Amazon Web Services
 
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksDeep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksAmazon Web Services
 
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...Amazon Web Services
 
Add User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon CognitoAdd User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon CognitoAmazon Web Services
 

Similar to Microsoft Graph API with OutSystems Event Subscriptions (20)

Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...Managing enterprise applications, permissions, and consent in Azure Active Di...
Managing enterprise applications, permissions, and consent in Azure Active Di...
 
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...
TugaIT 2017 Office 365 Multi-factor authentication with Microsoft Azure Activ...
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
Microsoft identity manoj mittal
Microsoft identity manoj mittalMicrosoft identity manoj mittal
Microsoft identity manoj mittal
 
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
2019 - Nova Code Camp - AuthZ fundamentals with ASP.NET Core
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platform
 
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...
CoLabora March 2022 -  Improve security posture by implementing new Azure AD ...CoLabora March 2022 -  Improve security posture by implementing new Azure AD ...
CoLabora March 2022 - Improve security posture by implementing new Azure AD ...
 
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...
SPSLisbon 2017 Office 365 Multi-factor Authentication with Microsoft Azure Ac...
 
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...
 
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech Talks
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech TalksDeep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech Talks
Deep Dive on User Sign-up Sign-in with Amazon Cognito - AWS Online Tech Talks
 
24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf24032022 Zero Trust for Developers Pub.pdf
24032022 Zero Trust for Developers Pub.pdf
 
Azure AD B2C Webinar Series: Custom Policies Part 1
Azure AD B2C Webinar Series: Custom Policies Part 1Azure AD B2C Webinar Series: Custom Policies Part 1
Azure AD B2C Webinar Series: Custom Policies Part 1
 
Display Microsoft Teams status on your smart light
Display Microsoft Teams status on your smart lightDisplay Microsoft Teams status on your smart light
Display Microsoft Teams status on your smart light
 
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
 
Implement Authorization in your Apps with Microsoft identity platform-June 2020
Implement Authorization in your Apps with Microsoft identity platform-June 2020Implement Authorization in your Apps with Microsoft identity platform-June 2020
Implement Authorization in your Apps with Microsoft identity platform-June 2020
 
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
 
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksDeep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
 
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...
Raleigh DevDay 2017: Managing User Onboarding, Sign-up, Sign-in, Identity and...
 
Add User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon CognitoAdd User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon Cognito
 

Recently uploaded

"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...ISPMAIndia
 
Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Fermin Galan
 
The Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThe Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThousandEyes
 
Joseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureJoseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureHironori Washizaki
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...ISPMAIndia
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...ISPMAIndia
 
Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxMindInventory
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!alttaskcom
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!ISPMAIndia
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이ssuser82c38d
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Jeffrey Haguewood
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...emili denli
 
killing camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfkilling camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfssuser82c38d
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriISPMAIndia
 
Cybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCIOWomenMagazine
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfssuser82c38d
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019VICTOR MAESTRE RAMIREZ
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfssuser82c38d
 

Recently uploaded (20)

"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A..."Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
"Discovery and Delivery through Product IntelliGenAI framework" by Ramkumar A...
 
Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227Orion Context Broker introduction 20240227
Orion Context Broker introduction 20240227
 
The Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and TakeawaysThe Top Outages of 2023: Analyses and Takeaways
The Top Outages of 2023: Analyses and Takeaways
 
Joseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about ArchitectureJoseph Yoder : Being Agile about Architecture
Joseph Yoder : Being Agile about Architecture
 
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ..."Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
"Taking an idea to a Product in Health diagnostics" by Dr. Geetha Manjunath, ...
 
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
Product Manager vs Product Owner – Why Do Companies Still Struggle 23 Years A...
 
Role of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptxRole of DevOps in SaaS product Development.pdf.pptx
Role of DevOps in SaaS product Development.pdf.pptx
 
Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!Welcome to AltTask - the nexus where innovation converges with empowerment!
Welcome to AltTask - the nexus where innovation converges with empowerment!
 
The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!The Age of AI: Elevating Experiences & Delivering Customer Value!
The Age of AI: Elevating Experiences & Delivering Customer Value!
 
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
killingcamp 광고삽입문제 풀이, killingcamp 광고삽입문제 풀이
 
Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)Automation for Bonterra Impact Management (fka Apricot)
Automation for Bonterra Impact Management (fka Apricot)
 
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
The Game-Changer_ How Software Development Outsource Can Catapult Your Growth...
 
killing camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdfkilling camp 주차장 나누기-2 topology sort.pdf
killing camp 주차장 나누기-2 topology sort.pdf
 
AI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit BendigiriAI Product Management by Abhijit Bendigiri
AI Product Management by Abhijit Bendigiri
 
Cybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdfCybersecurity Measures For Remote Workers.pdf
Cybersecurity Measures For Remote Workers.pdf
 
killingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdfkillingcamp longest common subsequence.pdf
killingcamp longest common subsequence.pdf
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019Implementing Docker Containers with Windows Server 2019
Implementing Docker Containers with Windows Server 2019
 
eLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdfeLearning Content Development Company Code and Pixels.pdf
eLearning Content Development Company Code and Pixels.pdf
 
killing camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdfkilling camp week 6 problem - maximal matrix.pdf
killing camp week 6 problem - maximal matrix.pdf
 

Microsoft Graph API with OutSystems Event Subscriptions

  • 1. Microsoft Graph API with OutSystems Event Subscriptions Subscribe and handle Microsoft Graph API change notifications in your application February 8thth 11am (CET) Stefan Weber Senior Director Software Development Telelink Business Services Germany GmbH OutSystems MVP – AWS Community Builder
  • 2. Fundamentals  Overview of Microsoft Graph API subscriptions  Basic Notifications and Rich Notifications  Subscription Lifecycle  Best Practices Agenda Implementation  Prerequisites  Entra Application Registration and Permissions  OAuth access token client credential flow  Subscribe and handle basic notifications  Handle lifecycle events  Subscribe and handle rich notifications
  • 3. Previous Webinars on Microsoft Graph API with OutSystems Application Permissions Query Microsoft Graph API with application permissions. Demonstration on how to acquire an access token from Microsoft Entra with an OAuth client credentials flow. https://youtu.be/yVK8WQz5qnU Delegated Permissions Query Microsoft Graph API with delegated (user) permissions. Demonstration on how to acquire an access token from Microsoft Entra with an OAuth authorization code flow. https://youtu.be/2cSsg5ws1H4
  • 4. Microsoft Graph API Event Subscription Microsoft Graph API event subscriptions allow you to subscribe to changes in resources such as messages, calendars, and contacts in Microsoft Graph. When a change occurs, the API sends a notification to the subscribed application. To create a subscription you must specify an event type – e.g. create – and a resource using an application or delegated access token with corresponding permissions (Scopes). Subscriptions expire and get deleted automatically on  Individual subscription expiry  Resource subscription lifetime limit  Access Token used for subscribing expires if Lifecycle Notifications are not handled by your application.
  • 5. Basic Notifications A basic notifications only returns the event type and the affected resource identifier back to your application. In order to get the details of the affected resource you must perform a Graph API query. It is the easiest way to get started with Microsoft Graph API event subscriptions. Resource Events Rich Notifications Rich Notifications include the affected resource data besides the event type and the resource identifier. Resource data in Rich Notifications is encrypted by a Public Key you must include when subscribing to an event and you need the corresponding Private Key to decrypt the resource data. You must specify explicitly which attributes should be transported as encrypted resource data.
  • 6. Lifecycle Events Missed Notification to your lifecycle events endpoint on non-delivered event e.g. because of Timeout. Actions to take  Acknowledge event by returning a status code of 202 – Accepted  Query the resource or perform a delta query to take further action Applicable only to Outlook Messages, Events and Personal Contacts. Subscription Removed Triggered whenever a subscription is removed from Microsoft Graph. Applicable only to Outlook Messages, Events and Contacts and Teams Chat Messages. Reauthorization Required This events hits your lifecycle events endpoint when  The access token is about to expire  The subscription is about to expire  A tenant administrator revoked permissions for your application Actions to take  Acknowledge event by returning a status code of 202 – Accepted  Reauthorize and update subscription
  • 7. Application  Configure application permissions on resources in your Entra application registration. Keep in mind that application permissions are very powerful and additional actions should be taken to limit application permissions.  Use the Client Credential OAuth2 flow to retrieve an access token.  Subscribe to resources using the access token.  On Reauthorization Required lifecycle events simply request a new access token via the Client Credential flow to reauthorize and update a subscription Subscribing as application or on-behalf of a user (delegated) Delegated  Configure delegated permissions on resources in your Entra application registration.  Make sure that you added the offline_access permission to get a refresh token.  Perform a Authorization Code OAuth2 flow to retrieve an access token and refresh token.  Subscribe to resources  On Reauthorization Required lifecycle events use a valid cached access token or retrieve a new access token using by performing a token refresh operation.
  • 9. Prerequisites  Access to your Azure Tenant using the Azure Portal  Cloud Application Administrator role assigned to your user account to register an application in your tenant.  Powershell to generate a Public/Private key pair for Rich Notifications.
  • 10. Demo Application GraphWebinar Event Subscriptions Available on Forge
  • 11. Rich Notifications Certificate / Private Key 11 <# Script generates a new certificate and private key private-key.xml The private key in XML format public.cer The public key base64 encoded #> $params = @{ Subject = "CN=Microsoft Graph Rich Notifications" CertStoreLocation = "Cert:CurrentUserMy" KeyExportPolicy = "Exportable" KeyUsage = "DataEncipherment" KeyAlgorithm = "RSA" KeyLength = 2048 KeyUsageProperty = "All" } # End Certificate Parameters $cert = New-SelfSignedCertificate @params # Create Certificate in User Certificate Store (Personal) $cert.PrivateKey.ToXmlString($true) | Out-File "private-key.xml" # Export the private key in XML Format [System.Convert]::ToBase64String($cert.Export('Cert')) | Out-File "public.cer" # Export the certificate (public) as DER base64 encoded
  • 13. Best practices  Try to avoid subscribing under application permissions. Use delegated permission if possible.  Use a single REST API to receive all Graph API webhooks. Don‘t create separate endpoints for different use cases.  For large volumes of subscriptions and events consider Azure Event Grid (preview) or Lambda to AWS EventBridge.
  • 14.  Master OAuth 2.0 Website  Microsoft Developer Program  Azure Portal  Microsoft Learn – Authorization Code Flow  Use the Microsoft Graph API documentation  Microsoft Graph Explorer  OAuth Token Exchange Forge component  CryptoAPI Forge component Additional Material  Microsoft Graph Permission Reference  Microsoft Graph API Lifecycle Events  Notifications Endpoint Validation  Rich Notifications
  • 15. Introduction and Bedrock Knowledge Bases  Overview of Amazon Bedrock  Configuration and Model Access  Creating a Knowledge Base  Query Knowledge Base Information  When to roll your own custom Knowledge Base  Use Bedrock Knowledge Bases for Retrievable Augmented Generation (RAG) in OutSystems applications. March 2024 Coming up – Amazon Bedrock Bedrock Agents and Action Groups  Overview of Agents and AI Reasoning  Create and Configure an Agent  Add Knowledge Base(s) to an Agent  Add Lambda Functions middleware to an Agent  Use Bedrock Agents in OutSystems applications April 2024
  • 16. Stefan Weber Senior Director Software Development Telelink Business Services Germany GmbH OutSystems MVP – AWS Community Builder https://www.tbs.tech https://www.linkedin.com/in/stefanweber1/ https://lcnc.blog