SlideShare une entreprise Scribd logo
1  sur  34
Everything you need to know about the
Microsoft Graph as a SharePoint Developer
SharePoint Saturday Utah
Sébastien Levert
Who’s that guy ?
@sebastienlevert | http://sebastienlevert.com | Product Evangelist & Partner Manager at
Agenda
Introduction
Building integration with Office 365
What is the Microsoft Graph?
Single endpoint for:
1 - Accessing data
/me, /users, /groups, /messages, /drive, ….
2 -Traversing data
/drive/<id>/lastmodifiedByUser
3 - Accessing insights
/insights/trending
4-Work/School and Personal
https://graph.microsoft.com/
Use the Microsoft Graph to build smart apps
Gateway to data and
insights in Office365
Easy traversal of objects and
rich relationships
Web Standards, Open
Platform
Secure data access
Authentication & Authorization
Azure AD Application
• Proxy to you Office 365 data
• Enable user-consent to be
transparent with the way the
application will play with the data
• Secure protocol
• No capturing user credentials
• Fine-grained access scopes
• Long-term access through refresh
tokens
Permissions
• Application permissions
• Act on the Microsoft Graph as a Deamon
• Authentication is certificate-based
• Delegated permissions
• Act on the Microsoft Graph as an authenticated user
• 60+ delegated permissions
• Does not replace the actual permissions on the data
Implicit Flow
Azure AD
Client Application Microsoft Graph
1
2
3
4
Token
Token
Ressources
Let’s play
Acting on the graph
• Getting Graph data
• Creating Graph data
• Updating Graph data
• Deleting Graph data
• Executing actions on the Graph
Acting on the Graph
GET https://graph.microsoft.com/v1.0/me
POST https://graph.microsoft.com/v1.0/groups
{
…
}
PATCH https://graph.microsoft.com/v1.0/groups/<id>
DELETE https://graph.microsoft.com/v1.0/groups/<id>
POST https://graph.microsoft.com/v1.0/me/sendMail
Exploring the Graph
• Using the Graph Explorer
• Using REST HTTP Calls
• Using .NET
• Using PnP PowerShell
• Using JavaScript
• Using the SDKs
Using the Graph Explorer
Using REST HTTP Calls
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25j…
Accept: application/json
GET https://graph.microsoft.com/v1.0/me
GET https://graph.microsoft.com/v1.0/me/messages
GET https://graph.microsoft.com/v1.0/me/drive/root/children
GET
https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/a
ny(c:c+eq+'Unified')
GET https://graph.microsoft.com/beta/me/trendingAround
GET https://graph.microsoft.com/beta/me/plans
Using REST HTTP Calls (SharePoint)
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25j…
Accept: application/json
GET https://graph.microsoft.com/beta/sharePoint/sites
GET https://graph.microsoft.com/beta/sharePoint/site
GET https://graph.microsoft.com/beta/sharePoint:/site/lab
GET https://graph.microsoft.com/beta/sharePoint/site/lists
GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/items
GET https://graph.microsoft.com/beta/sharePoint/site/drives
GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/drive
GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/drive/root/children
Using .NET
var me = graphServiceClient.Me.Request().GetAsync();
var calendar = await graphServiceClient
.Me
.Calendar
.Request()
.Select("id")
.GetAsync();
var children = await graphServiceClient
.Me
.Drive
.Root
.Children
.Request()
.Expand("thumbnails")
.GetAsync();
var children = await graphServiceClient .Me .Drive .Items[itemId] .Children .Request() .Expand("thumbnails") .GetAsync();
Using PnP PowerShell
Connect-PnPMicrosoftGraph -Scopes @("Group.ReadWrite.All")
Get-PnPUnifiedGroup
$group = New-PnPUnifiedGroup -DisplayName "SPS Utah" `
-Description "SPS Utah" `
-MailNickname "spsutah"
Remove-PnPUnifiedGroup -Identity $group.GroupId
Using JavaScript
// construct the email object
const mail = {
subject: "Microsoft Graph JavaScript Sample",
toRecipients: [{
emailAddress: {
address: "example@example.com"
}
}],
body: {
content: "<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-
sdk-javascript",
contentType: "html"
}
}
client
.api('/users/me/sendMail')
.post({message: mail}, (err, res) => {
console.log(res)
})
Using the SDKs
Be notified by the Graph
• Webhooks
Creating a webhook on the Graph
POST https://graph.microsoft.com/beta/subscriptions
{
"changeType": "Created",
"notificationUrl": "https://<url>/api/webhookCallback",
"resource": "me/messages"
}
Being notified from a webhook
POST https://<url>/api/webhookCallback
{
"value":[
{
"subscriptionId":"7f105c7d-2dc5-4530-97cd-4e7af6534c07",
"subscriptionExpirationDateTime":"2015-11-20T18:23:45.9356913Z",
"changeType":"Created",
"resource":"Users/<user-id>/messages/<message-id>",
"resourceData":{
"@odata.type":"#Microsoft.Graph.Message",
"@odata.id":"Users/<user-id>/messages/<message-id>",
"@odata.etag":"W/"CQAAABYAAACoeN6SYXGLRrvRm+CYrrfQAACvvGdb"",
"Id“:"<message-id>"
}
}
]
}
Extending the Graph
• Open type extensions
• Schema extensions
Open type extensions
POST https://graph.microsoft.com/beta/me/contacts/ID/extensions
{
"@odata.type": "Microsoft.Graph.OpenTypeExtension",
"extensionName": "Contacts.Extensions.LinkedIn",
"linkedInUrl": "https://www.linkedin.com/in/seb/"
}
Defining a schema extension
POST https://graph.Microsoft.com/beta/schemaExtensions
{
"id": "linkedin_information",
"description": "All information about LinkedIn account",
"targetType": ["Contacts"],
"available": "Online",
"properties" : [
"name": "linkedInUrl",
"type": "String"
]
}
Adding a schema extension data
POST https://graph.microsoft.com/beta/me/contacts/ID
{
"linkedin_information": {
"linkedInUrl": "https://www.linkedin.com/in/seb/"
}
}
Next Steps
Resources
• https://dev.office.com
• https://graph.microsoft.io
• https://channel9.msdn.com/Events/Connect/2016/213
• https://techcommunity.microsoft.com/t5/Microsoft-Ignite-
Content/BRK4016-Access-SharePoint-files-and-lists-using-
SharePoint-API/td-p/10403
• https://mva.microsoft.com/product-training/office-development
Samples
• https://github.com/SharePoint/PnP-PowerShell
• https://github.com/microsoftgraph/msgraph-sdk-javascript
• https://github.com/sebastienlevert/officehub
Share your experience
• Use hashtags to share your experience
• #Office365Dev
• #MicrosoftGraph
• Contribute and ask question to the MicrosoftTech Community
• https://slevert.me/tech-community-sp-dev
• Log issues & questions to the GitHub Repositories
Thank you!
@sebastienlevert | http://sebastienlevert.com | Product Evangelist & Partner Manager at

Contenu connexe

Tendances

Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
David J Rosenthal
 

Tendances (20)

Office Dev Day 2018 - Extending Microsoft Teams
Office Dev Day 2018 - Extending Microsoft TeamsOffice Dev Day 2018 - Extending Microsoft Teams
Office Dev Day 2018 - Extending Microsoft Teams
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
 
Building productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft GraphBuilding productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft Graph
 
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s PerspectiveESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
ESPC Teams week Microsoft Teams & Bot Framework – a Developer’s Perspective
 
Collaboration Throwdown: Salesforce verses SharePoint
Collaboration Throwdown: Salesforce verses SharePointCollaboration Throwdown: Salesforce verses SharePoint
Collaboration Throwdown: Salesforce verses SharePoint
 
Power Apps Connector
Power Apps ConnectorPower Apps Connector
Power Apps Connector
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
 
Built Forms, Lists & Workflows with the IBM Forms Experience Builder (FEB) fo...
Built Forms, Lists & Workflows with the IBM Forms Experience Builder (FEB) fo...Built Forms, Lists & Workflows with the IBM Forms Experience Builder (FEB) fo...
Built Forms, Lists & Workflows with the IBM Forms Experience Builder (FEB) fo...
 
Microsoft Teams as a Development Platform
Microsoft Teams as a Development PlatformMicrosoft Teams as a Development Platform
Microsoft Teams as a Development Platform
 
Windows Azure SQL Database Federations
Windows Azure SQL Database FederationsWindows Azure SQL Database Federations
Windows Azure SQL Database Federations
 
Integrating Salesforce and SharePoint 2013
Integrating Salesforce and  SharePoint 2013Integrating Salesforce and  SharePoint 2013
Integrating Salesforce and SharePoint 2013
 
SharePoint Development For Asp Net Developers
SharePoint Development For Asp Net DevelopersSharePoint Development For Asp Net Developers
SharePoint Development For Asp Net Developers
 
Share Point For Beginners V1
Share Point For Beginners V1Share Point For Beginners V1
Share Point For Beginners V1
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
ECS 19 - Chris O'Brien - The hit list - Office 365 dev techniques you should ...
 
Microsoft Flow best practices European Collaboration Summit 2018
Microsoft Flow best practices European Collaboration Summit 2018Microsoft Flow best practices European Collaboration Summit 2018
Microsoft Flow best practices European Collaboration Summit 2018
 
Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010Claims-Based Identity in SharePoint 2010
Claims-Based Identity in SharePoint 2010
 
SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012
 
Building Components and Services for the Programmable Web
Building Components and Services for the Programmable WebBuilding Components and Services for the Programmable Web
Building Components and Services for the Programmable Web
 
SharePoint Online and Azure - Better Together
SharePoint Online and Azure - Better TogetherSharePoint Online and Azure - Better Together
SharePoint Online and Azure - Better Together
 

Similaire à SPS Utah - Everything your need to know about the Microsoft Graph as a SharePoint developer

Similaire à SPS Utah - Everything your need to know about the Microsoft Graph as a SharePoint developer (20)

SharePoint Saturday Chicago - Everything your need to know about the Microsof...
SharePoint Saturday Chicago - Everything your need to know about the Microsof...SharePoint Saturday Chicago - Everything your need to know about the Microsof...
SharePoint Saturday Chicago - Everything your need to know about the Microsof...
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
Create cross-platform apps that interact with Microsoft Graph and Office 365 ...
Create cross-platform apps that interact with Microsoft Graph and Office 365 ...Create cross-platform apps that interact with Microsoft Graph and Office 365 ...
Create cross-platform apps that interact with Microsoft Graph and Office 365 ...
 
Microsoft graph and power platform champ
Microsoft graph and power platform   champMicrosoft graph and power platform   champ
Microsoft graph and power platform champ
 
Xamarin microsoft graph
Xamarin microsoft graphXamarin microsoft graph
Xamarin microsoft graph
 
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
 
#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...
 
#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 graph a way to build secure and smart apps
Microsoft graph a way to build secure and smart appsMicrosoft graph a way to build secure and smart apps
Microsoft graph a way to build secure and smart apps
 
#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph
#Techorama belgium 2018 vincent biret what's new with the #MicrosoftGraph
 
Microsoft Graph community call - March 6, 2018
Microsoft Graph community call - March 6, 2018Microsoft Graph community call - March 6, 2018
Microsoft Graph community call - March 6, 2018
 
How to use Microsoft Graph in your applications
How to use Microsoft Graph in your applicationsHow to use Microsoft Graph in your applications
How to use Microsoft Graph in your applications
 
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...
 
Developing share point solutions with the microsoft graph
Developing share point solutions with the microsoft graphDeveloping share point solutions with the microsoft graph
Developing share point solutions with the microsoft graph
 
Office Add-in & Microsoft Graph - Development 101
Office Add-in & Microsoft Graph - Development 101Office Add-in & Microsoft Graph - Development 101
Office Add-in & Microsoft Graph - Development 101
 
European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...European SharePoint Conference 2018 - Build an intelligent application by con...
European SharePoint Conference 2018 - Build an intelligent application by con...
 
Super Charge your Applications with Microsoft Graph
Super Charge your Applications with Microsoft GraphSuper Charge your Applications with Microsoft Graph
Super Charge your Applications with Microsoft Graph
 
#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
 
SharePoint Saturday Houston 2016 - Microsoft Graph - Deep Dive
SharePoint Saturday Houston 2016 - Microsoft Graph - Deep DiveSharePoint Saturday Houston 2016 - Microsoft Graph - Deep Dive
SharePoint Saturday Houston 2016 - Microsoft Graph - Deep Dive
 

Plus de Sébastien Levert

Plus de Sébastien Levert (20)

SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutesSharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
SharePoint Fest Chicago 2019 - Build a Full Intranet in 70 minutes
 
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
SharePoint Fest Chicago 2019 - Building tailored search experiences in Modern...
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
 
ESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development TechniquesESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
ESPC19 - Supercharge Your Teams Experience with Advanced Development Techniques
 
ESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFxESPC19 - Build Your First Microsoft Teams App Using SPFx
ESPC19 - Build Your First Microsoft Teams App Using SPFx
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
 
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
SharePoint Fest Seattle 2019 - Building tailored search experiences in Modern...
 
SPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePointSPC19 - Building tailored search experiences in Modern SharePoint
SPC19 - Building tailored search experiences in Modern SharePoint
 
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
SharePoint Fest 2019 - Build an intelligent application by connecting it to t...
 
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
SharePoint Fest DC 2019 - Bot Framework and Microsoft Graph - Join The Revolu...
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
 
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFxWebinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
 
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
SPTechCon Austin 2019 - Top 10 feature trends to make you fall in love with y...
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 development
 
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 developmentSharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
SharePoint Fest Chicago 2018 - From SharePoint to Office 365 development
 
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
SharePoint Saturday Vienna 2018 - Top 10 feature trends to make you fall in l...
 
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutesSharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
SharePoint Saturday Vienna 2018 - Building a modern intranet in 60 minutes
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
 
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutesNashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
Nashville SharePoint User Group 2018 - Building a modern intranet in 60 minutes
 
SharePoint Fest Seattle 2018 - Build an intelligent application by connecting...
SharePoint Fest Seattle 2018 - Build an intelligent application by connecting...SharePoint Fest Seattle 2018 - Build an intelligent application by connecting...
SharePoint Fest Seattle 2018 - Build an intelligent application by connecting...
 

Dernier

+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@
 
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
 
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
 

Dernier (20)

"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 - 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...
 
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
 
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
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
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
 
+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...
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

SPS Utah - Everything your need to know about the Microsoft Graph as a SharePoint developer

  • 1. Everything you need to know about the Microsoft Graph as a SharePoint Developer SharePoint Saturday Utah Sébastien Levert
  • 2. Who’s that guy ? @sebastienlevert | http://sebastienlevert.com | Product Evangelist & Partner Manager at
  • 6. What is the Microsoft Graph? Single endpoint for: 1 - Accessing data /me, /users, /groups, /messages, /drive, …. 2 -Traversing data /drive/<id>/lastmodifiedByUser 3 - Accessing insights /insights/trending 4-Work/School and Personal https://graph.microsoft.com/
  • 7. Use the Microsoft Graph to build smart apps Gateway to data and insights in Office365 Easy traversal of objects and rich relationships Web Standards, Open Platform Secure data access
  • 9. Azure AD Application • Proxy to you Office 365 data • Enable user-consent to be transparent with the way the application will play with the data • Secure protocol • No capturing user credentials • Fine-grained access scopes • Long-term access through refresh tokens
  • 10. Permissions • Application permissions • Act on the Microsoft Graph as a Deamon • Authentication is certificate-based • Delegated permissions • Act on the Microsoft Graph as an authenticated user • 60+ delegated permissions • Does not replace the actual permissions on the data
  • 11. Implicit Flow Azure AD Client Application Microsoft Graph 1 2 3 4 Token Token Ressources
  • 13. Acting on the graph • Getting Graph data • Creating Graph data • Updating Graph data • Deleting Graph data • Executing actions on the Graph
  • 14. Acting on the Graph GET https://graph.microsoft.com/v1.0/me POST https://graph.microsoft.com/v1.0/groups { … } PATCH https://graph.microsoft.com/v1.0/groups/<id> DELETE https://graph.microsoft.com/v1.0/groups/<id> POST https://graph.microsoft.com/v1.0/me/sendMail
  • 15. Exploring the Graph • Using the Graph Explorer • Using REST HTTP Calls • Using .NET • Using PnP PowerShell • Using JavaScript • Using the SDKs
  • 16. Using the Graph Explorer
  • 17. Using REST HTTP Calls Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25j… Accept: application/json GET https://graph.microsoft.com/v1.0/me GET https://graph.microsoft.com/v1.0/me/messages GET https://graph.microsoft.com/v1.0/me/drive/root/children GET https://graph.microsoft.com/v1.0/groups?$filter=groupTypes/a ny(c:c+eq+'Unified') GET https://graph.microsoft.com/beta/me/trendingAround GET https://graph.microsoft.com/beta/me/plans
  • 18. Using REST HTTP Calls (SharePoint) Authorization: Bearer eyJ0eXAiOiJKV1QiLCJub25j… Accept: application/json GET https://graph.microsoft.com/beta/sharePoint/sites GET https://graph.microsoft.com/beta/sharePoint/site GET https://graph.microsoft.com/beta/sharePoint:/site/lab GET https://graph.microsoft.com/beta/sharePoint/site/lists GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/items GET https://graph.microsoft.com/beta/sharePoint/site/drives GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/drive GET https://graph.microsoft.com/beta/sharePoint/site/lists/<id>/drive/root/children
  • 19. Using .NET var me = graphServiceClient.Me.Request().GetAsync(); var calendar = await graphServiceClient .Me .Calendar .Request() .Select("id") .GetAsync(); var children = await graphServiceClient .Me .Drive .Root .Children .Request() .Expand("thumbnails") .GetAsync(); var children = await graphServiceClient .Me .Drive .Items[itemId] .Children .Request() .Expand("thumbnails") .GetAsync();
  • 20. Using PnP PowerShell Connect-PnPMicrosoftGraph -Scopes @("Group.ReadWrite.All") Get-PnPUnifiedGroup $group = New-PnPUnifiedGroup -DisplayName "SPS Utah" ` -Description "SPS Utah" ` -MailNickname "spsutah" Remove-PnPUnifiedGroup -Identity $group.GroupId
  • 21. Using JavaScript // construct the email object const mail = { subject: "Microsoft Graph JavaScript Sample", toRecipients: [{ emailAddress: { address: "example@example.com" } }], body: { content: "<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph- sdk-javascript", contentType: "html" } } client .api('/users/me/sendMail') .post({message: mail}, (err, res) => { console.log(res) })
  • 23. Be notified by the Graph • Webhooks
  • 24. Creating a webhook on the Graph POST https://graph.microsoft.com/beta/subscriptions { "changeType": "Created", "notificationUrl": "https://<url>/api/webhookCallback", "resource": "me/messages" }
  • 25. Being notified from a webhook POST https://<url>/api/webhookCallback { "value":[ { "subscriptionId":"7f105c7d-2dc5-4530-97cd-4e7af6534c07", "subscriptionExpirationDateTime":"2015-11-20T18:23:45.9356913Z", "changeType":"Created", "resource":"Users/<user-id>/messages/<message-id>", "resourceData":{ "@odata.type":"#Microsoft.Graph.Message", "@odata.id":"Users/<user-id>/messages/<message-id>", "@odata.etag":"W/"CQAAABYAAACoeN6SYXGLRrvRm+CYrrfQAACvvGdb"", "Id“:"<message-id>" } } ] }
  • 26. Extending the Graph • Open type extensions • Schema extensions
  • 27. Open type extensions POST https://graph.microsoft.com/beta/me/contacts/ID/extensions { "@odata.type": "Microsoft.Graph.OpenTypeExtension", "extensionName": "Contacts.Extensions.LinkedIn", "linkedInUrl": "https://www.linkedin.com/in/seb/" }
  • 28. Defining a schema extension POST https://graph.Microsoft.com/beta/schemaExtensions { "id": "linkedin_information", "description": "All information about LinkedIn account", "targetType": ["Contacts"], "available": "Online", "properties" : [ "name": "linkedInUrl", "type": "String" ] }
  • 29. Adding a schema extension data POST https://graph.microsoft.com/beta/me/contacts/ID { "linkedin_information": { "linkedInUrl": "https://www.linkedin.com/in/seb/" } }
  • 31. Resources • https://dev.office.com • https://graph.microsoft.io • https://channel9.msdn.com/Events/Connect/2016/213 • https://techcommunity.microsoft.com/t5/Microsoft-Ignite- Content/BRK4016-Access-SharePoint-files-and-lists-using- SharePoint-API/td-p/10403 • https://mva.microsoft.com/product-training/office-development
  • 33. Share your experience • Use hashtags to share your experience • #Office365Dev • #MicrosoftGraph • Contribute and ask question to the MicrosoftTech Community • https://slevert.me/tech-community-sp-dev • Log issues & questions to the GitHub Repositories
  • 34. Thank you! @sebastienlevert | http://sebastienlevert.com | Product Evangelist & Partner Manager at