SlideShare a Scribd company logo
Microsoft Graph Toolkitを使ってGraph開発を体験しよう
2021.06 第3回Japan M365 Dev User Group勉強会
#M365Dev
誰?
Takas(@DevTakas)
Angular / Azure / .NET Core / Azure DevOps / Microsoft Graph
Microsoft MVP Office Development
#M365Dev
誰?
ブログやってます
http://takasdev.hatenablog.com/
「はまったりひらめいたり…とか…」
#M365Dev
おしながき
1. Microsoft Graph Toolkitとは
2. Microsoft Graph Toolkitを使ってみよう
3. ソースコードを眺めてみよう
4. Build2021で発表された内容
5. まとめ
#M365Dev
Microsoft Graph Toolkitとは
- 公式のドキュメントから
Microsoft Graph Toolkitコンポーネントは、Web アプリケーション、SharePoint Web パーツ、または
Microsoft Teams タブに簡単に追加できます。 コンポーネントは Web 標準に基づいており、プレーンな
JavaScript プロジェクトまたは Reach、Angular、Vue.js などの一般的な Web フレームワークの両方で使用
できます。
#M365Dev
Microsoft Graph Toolkitとは
- 公式のドキュメントから
• JavaScriptライブラリ
• 大雑把に分けて2つの機能が提供される
• Web Componentで提供されるコントロール群
• データアクセスをサポートしてくれるプロバイダー群
#M365Dev
Microsoft Graph Toolkitとは
-Graph開発ってめっちゃ大変
• 認証を行うライブラリの知識
• (使用するのであれば)GraphClientの知識
• それを組み合わせる手段
• HTML/JS/CSS
• Graphで提供される情報について
#M365Dev
Microsoft Graph Toolkitとは
-Component
• 提供されるコントロールについて
• Web Componentで提供される
• HTML標準の<div>やらと同じように
mgtが提供するControlをHTMLテンプレート上で記述できる
• 例えば、HTMLで下記の記述を行うだけでログイン機構込で実装可能
• JSはGraphToolKitを読み込むだけで、自前で実装する箇所はない
<mgt-login></mgt-login>
#M365Dev
Microsoft Graph Toolkitとは
-プロバイダ
• 認証を簡易に実装するための機能を提供してくれる
• msal
• SharePoint
• Teams
• Electron
• HTMLテンプレートでもプロバイダの設定を行える
#M365Dev
Microsoft Graph Toolkitとは
• Graph開発でめっちゃらくできる😀
• といっても知識が不要というわけではない
• もちろん知識は必要だが敷居はとても下がった
#M365Dev
Microsoft Graph Toolkitとは
- 使い方の学習はどのリソースを行うのが良いのか
• Microsoft LearnのGraph関連がおすすめ
• Graphの基礎から抑えているので基本からやりたい場合に良い
• ぶっちゃけ今回のセッションの内容はここをなぞっている
• すでに終了しているがSkillChallengeのコレクションが良い感じ
• https://docs.microsoft.com/ja-jp/users/cloudskillschallenge/collections/67pku3g07x08?WT.mc_id=cloudskillschallenge_7ca6c7f7-cc0d-4c31-9b74-5ce5658787e7
#M365Dev
Microsoft Graph Toolkitとは
- 使い方やどんなコントロールがあるか眺めてみたい
• Storybookが提供されておりComponentの使い方など確認可能
• https://mgt.dev/
• JSやCSSもいじれるのでちょい試したい時に使うのも良し
• Template使った例もあるのでそれの手本にみるのも有り
#M365Dev
Microsoft Graph Toolkitを使ってみよう
- 基本的な使い方
1. Azure ADアプリケーションを作成する
2. HTML(or npm)でToolkitライブラリを読み込む
3. HTMLテンプレート上でがんばる
#M365Dev
Microsoft Graph Toolkitを使ってみよう
-レイアウトをいじってみる
• 各Componentで提供されているカスタムプロパティに指定するのが推奨されている
• Componentから提供されているプロパティはDocumentで確認可能
• 既定でライトテーマとダークテーマのCSSセットが提供されている
• mgt-light / mgt-dark
#M365Dev
Microsoft Graph Toolkitを使ってみよう
-自分の好きな構成にしてみる
• そもそもデータだけで画面構成は自分で好きに組みたい場合
• テンプレートToolkitを使用
• Componentをベースに描画される要素を上書きする
• HTMLテンプレートで全部実装可能
• {{プロパティ}}でデータバインドできる
• Componentから提供されるプロパティはドキュメントから参照可能
• 実態はGraphのプロパティなのでそっちも抑えておくと尚良
• 困ったら<mgt-get>
• リクエストから指定できるのでComponentが存在しないデータにも
• テンプレートで使える構文などは👇参照
• https://docs.microsoft.com/ja-jp/graph/toolkit/customize-components/templates
#M365Dev
ソースコードを眺めてみよう
-GitHubのプロジェクト構成を見てみる
• samples
• 様々な実装サンプルが格納されている
• 一番最初はここをみれば良いと思う
• packages
• 各ライブラリの実装の実態はここ
• 構成など
• プラクティスの集合体なので自分で作る時の参考に
• https://github.com/microsoftgraph/microsoft-graph-toolkit
#M365Dev
Build2021で発表された内容
• msal2プロバイダが提供開始された
• これでSPAアプリケーションでAzureADアプリを構成できる
• 👆はPKCE対応されているアプリケーションなので基本
こっちにしたほうが良い
• mgt-file/mgt-file-listが提供開始
• OneDriveの中身を参照するComponentとなっている
• どちらも最新のライブラリで提供済み
• build直後は入ってなかったがいつの間にか合流していた
#M365Dev
まとめ
• Microsoft Graph Toolkitを使用することで簡単に
Graphデータを利用したFront開発を行うことができる
• フロントだけでなくTeamsやSharePoint開発でも
• カスタマイズは容易
• CSSによる変更はもちろん構成からまるっと変更可能
• 爆速で開発できるようになるのでどんどん活用していこう
• JS/CSSそこまで弄らなくても良いのでPoCとか初心者の学習にも最適
#M365Dev
参考ページ
• Microsoft Graph Playground
• https://mgt.dev/
• Microsoft Graph Toolkit: Microsoft サービスの UI コンポーネントと認証プロバイダー Graph
• https://docs.microsoft.com/ja-jp/graph/toolkit/overview
• Microsoft Graph ツールキットを使ってアプリを開発
• https://docs.microsoft.com/ja-jp/learn/paths/m365-msgraph-toolkit/
• microsoft-grah-toolkit
• https://github.com/microsoftgraph/microsoft-graph-toolkit
#M365Dev

More Related Content

What's hot

Microsoft Office 365 What's New for March 2021
Microsoft Office 365 What's New for March 2021Microsoft Office 365 What's New for March 2021
Microsoft Office 365 What's New for March 2021
Regroove
 
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Monitoring your Spring Boot and Micronaut microservices with MicrometerMonitoring your Spring Boot and Micronaut microservices with Micrometer
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Ko Turk
 
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
Danilo Bordini
 
Angular.js vs node.js how are they different
Angular.js vs node.js  how are they different Angular.js vs node.js  how are they different
Angular.js vs node.js how are they different
denizjohn
 
DevDay 2017: Daniel Meixner - Von 0 auf DevOps
DevDay 2017: Daniel Meixner - Von 0 auf DevOpsDevDay 2017: Daniel Meixner - Von 0 auf DevOps
DevDay 2017: Daniel Meixner - Von 0 auf DevOps
DevDay Dresden
 
打造 AIoT 智慧物聯網時代解決方案
打造 AIoT 智慧物聯網時代解決方案打造 AIoT 智慧物聯網時代解決方案
打造 AIoT 智慧物聯網時代解決方案
Poy Chang
 
Why use Node.js for Enterprises Solutions?
Why use Node.js for Enterprises Solutions?Why use Node.js for Enterprises Solutions?
Why use Node.js for Enterprises Solutions?
Marie Weaver
 

What's hot (7)

Microsoft Office 365 What's New for March 2021
Microsoft Office 365 What's New for March 2021Microsoft Office 365 What's New for March 2021
Microsoft Office 365 What's New for March 2021
 
Monitoring your Spring Boot and Micronaut microservices with Micrometer
Monitoring your Spring Boot and Micronaut microservices with MicrometerMonitoring your Spring Boot and Micronaut microservices with Micrometer
Monitoring your Spring Boot and Micronaut microservices with Micrometer
 
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
DevOps : Criando uma prática eficiente de desenvolvimento, implementaçao e op...
 
Angular.js vs node.js how are they different
Angular.js vs node.js  how are they different Angular.js vs node.js  how are they different
Angular.js vs node.js how are they different
 
DevDay 2017: Daniel Meixner - Von 0 auf DevOps
DevDay 2017: Daniel Meixner - Von 0 auf DevOpsDevDay 2017: Daniel Meixner - Von 0 auf DevOps
DevDay 2017: Daniel Meixner - Von 0 auf DevOps
 
打造 AIoT 智慧物聯網時代解決方案
打造 AIoT 智慧物聯網時代解決方案打造 AIoT 智慧物聯網時代解決方案
打造 AIoT 智慧物聯網時代解決方案
 
Why use Node.js for Enterprises Solutions?
Why use Node.js for Enterprises Solutions?Why use Node.js for Enterprises Solutions?
Why use Node.js for Enterprises Solutions?
 

Similar to Microsoft Graph Toolkitを使ってGraph開発を体験しよう

Microsoft Graph Toolkitで手軽にM365フロント開発
Microsoft Graph Toolkitで手軽にM365フロント開発Microsoft Graph Toolkitで手軽にM365フロント開発
Microsoft Graph Toolkitで手軽にM365フロント開発
DevTakas
 
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...
Sébastien Levert
 
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en AzureGapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
Alberto Diaz Martin
 
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
Chirag Patel
 
How do you choose the best Microsoft development tool for your project.docx
How do you choose the best Microsoft development tool for your project.docxHow do you choose the best Microsoft development tool for your project.docx
How do you choose the best Microsoft development tool for your project.docx
I-Verve Inc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
 
Ravi Sahu Profile
Ravi Sahu ProfileRavi Sahu Profile
Ravi Sahu ProfileRavi Sahu
 
Creating reusable pieces in Logic Apps
Creating reusable pieces in Logic AppsCreating reusable pieces in Logic Apps
Creating reusable pieces in Logic Apps
BizTalk360
 
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Chirag Patel
 
Top 25+ .Net development tools for intelligent business solutions - AppsDevPro
Top 25+ .Net development tools for intelligent business solutions - AppsDevProTop 25+ .Net development tools for intelligent business solutions - AppsDevPro
Top 25+ .Net development tools for intelligent business solutions - AppsDevPro
SofiaCarter4
 
TechnoGeek training report
TechnoGeek training reportTechnoGeek training report
TechnoGeek training report
Anup Singh
 
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
Sébastien Levert
 
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
DevOpsGuys FutureDecoded 2016 - is DevOps the AnswerDevOpsGuys FutureDecoded 2016 - is DevOps the Answer
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
DevOpsGroup
 
Microsoft Graph community call May, 2018
Microsoft Graph community call May, 2018Microsoft Graph community call May, 2018
Microsoft Graph community call May, 2018
Microsoft 365 Developer
 
10 Important Web Development Tools Every Developer Should Know.pdf
10 Important Web Development Tools Every Developer Should Know.pdf10 Important Web Development Tools Every Developer Should Know.pdf
10 Important Web Development Tools Every Developer Should Know.pdf
Codevelop us
 
Microsoft graph monthly call september 2018
Microsoft graph monthly call september 2018Microsoft graph monthly call september 2018
Microsoft graph monthly call september 2018
Microsoft 365 Developer
 
Factsheet ea composer-april-2017
Factsheet ea composer-april-2017Factsheet ea composer-april-2017
Factsheet ea composer-april-2017
eacomposer
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
IRJET Journal
 
Best software development tools
Best software development toolsBest software development tools
Best software development tools
philipthomas428223
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
IRJET Journal
 

Similar to Microsoft Graph Toolkitを使ってGraph開発を体験しよう (20)

Microsoft Graph Toolkitで手軽にM365フロント開発
Microsoft Graph Toolkitで手軽にM365フロント開発Microsoft Graph Toolkitで手軽にM365フロント開発
Microsoft Graph Toolkitで手軽にM365フロント開発
 
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...
 
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en AzureGapand 2017 - Diseñando Arquitecturas Serverless en Azure
Gapand 2017 - Diseñando Arquitecturas Serverless en Azure
 
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
Navigating your way to different admin centres in Microsoft 365 - M365 Saturd...
 
How do you choose the best Microsoft development tool for your project.docx
How do you choose the best Microsoft development tool for your project.docxHow do you choose the best Microsoft development tool for your project.docx
How do you choose the best Microsoft development tool for your project.docx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Ravi Sahu Profile
Ravi Sahu ProfileRavi Sahu Profile
Ravi Sahu Profile
 
Creating reusable pieces in Logic Apps
Creating reusable pieces in Logic AppsCreating reusable pieces in Logic Apps
Creating reusable pieces in Logic Apps
 
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Pune...
 
Top 25+ .Net development tools for intelligent business solutions - AppsDevPro
Top 25+ .Net development tools for intelligent business solutions - AppsDevProTop 25+ .Net development tools for intelligent business solutions - AppsDevPro
Top 25+ .Net development tools for intelligent business solutions - AppsDevPro
 
TechnoGeek training report
TechnoGeek training reportTechnoGeek training report
TechnoGeek training report
 
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
SharePoint Wednesday Port Elisabeth - Introduction to AngularJS with the Micr...
 
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
DevOpsGuys FutureDecoded 2016 - is DevOps the AnswerDevOpsGuys FutureDecoded 2016 - is DevOps the Answer
DevOpsGuys FutureDecoded 2016 - is DevOps the Answer
 
Microsoft Graph community call May, 2018
Microsoft Graph community call May, 2018Microsoft Graph community call May, 2018
Microsoft Graph community call May, 2018
 
10 Important Web Development Tools Every Developer Should Know.pdf
10 Important Web Development Tools Every Developer Should Know.pdf10 Important Web Development Tools Every Developer Should Know.pdf
10 Important Web Development Tools Every Developer Should Know.pdf
 
Microsoft graph monthly call september 2018
Microsoft graph monthly call september 2018Microsoft graph monthly call september 2018
Microsoft graph monthly call september 2018
 
Factsheet ea composer-april-2017
Factsheet ea composer-april-2017Factsheet ea composer-april-2017
Factsheet ea composer-april-2017
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
 
Best software development tools
Best software development toolsBest software development tools
Best software development tools
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
 

More from DevTakas

Azure Artifactsを触ってみよう
Azure Artifactsを触ってみようAzure Artifactsを触ってみよう
Azure Artifactsを触ってみよう
DevTakas
 
Azure Web PubSub Serviceを触ってみた
Azure Web PubSub Serviceを触ってみたAzure Web PubSub Serviceを触ってみた
Azure Web PubSub Serviceを触ってみた
DevTakas
 
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
DevTakas
 
Azure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれAzure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれ
DevTakas
 
ASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おうASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おう
DevTakas
 
Microsoft Graphのことはじめ
Microsoft GraphのことはじめMicrosoft Graphのことはじめ
Microsoft Graphのことはじめ
DevTakas
 
Azure Event HubsでGraph変更通知を受け取る
Azure Event HubsでGraph変更通知を受け取るAzure Event HubsでGraph変更通知を受け取る
Azure Event HubsでGraph変更通知を受け取る
DevTakas
 
msal.js v2を触る
msal.js v2を触るmsal.js v2を触る
msal.js v2を触る
DevTakas
 
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
DevTakas
 
TeamsのチャネルとやりとりするWeb Applicationを作ったお話
TeamsのチャネルとやりとりするWeb Applicationを作ったお話TeamsのチャネルとやりとりするWeb Applicationを作ったお話
TeamsのチャネルとやりとりするWeb Applicationを作ったお話
DevTakas
 
Azure AD Application を使用した認証のアレコレ
Azure AD Applicationを使用した認証のアレコレAzure AD Applicationを使用した認証のアレコレ
Azure AD Application を使用した認証のアレコレ
DevTakas
 
Microsoft Graphの変更通知で遊ぶ
Microsoft Graphの変更通知で遊ぶMicrosoft Graphの変更通知で遊ぶ
Microsoft Graphの変更通知で遊ぶ
DevTakas
 
Microsoft Graphを使ってアプリケーションを作った時の話
Microsoft Graphを使ってアプリケーションを作った時の話Microsoft Graphを使ってアプリケーションを作った時の話
Microsoft Graphを使ってアプリケーションを作った時の話
DevTakas
 
Microsoft Graphことはじめ クエリパラメータ編
Microsoft Graphことはじめ クエリパラメータ編Microsoft Graphことはじめ クエリパラメータ編
Microsoft Graphことはじめ クエリパラメータ編
DevTakas
 
Microsoft Graph完全に理解した気がしてた
Microsoft Graph完全に理解した気がしてたMicrosoft Graph完全に理解した気がしてた
Microsoft Graph完全に理解した気がしてた
DevTakas
 
AzureADの認証で失敗した話
AzureADの認証で失敗した話AzureADの認証で失敗した話
AzureADの認証で失敗した話
DevTakas
 
msal.jsを使う
msal.jsを使うmsal.jsを使う
msal.jsを使う
DevTakas
 

More from DevTakas (17)

Azure Artifactsを触ってみよう
Azure Artifactsを触ってみようAzure Artifactsを触ってみよう
Azure Artifactsを触ってみよう
 
Azure Web PubSub Serviceを触ってみた
Azure Web PubSub Serviceを触ってみたAzure Web PubSub Serviceを触ってみた
Azure Web PubSub Serviceを触ってみた
 
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
Azure ADアプリケーションを使用した認証のあれやこれ ASP.NET Core編
 
Azure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれAzure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれ
 
ASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おうASP.NET Core WebAPIでODataを使おう
ASP.NET Core WebAPIでODataを使おう
 
Microsoft Graphのことはじめ
Microsoft GraphのことはじめMicrosoft Graphのことはじめ
Microsoft Graphのことはじめ
 
Azure Event HubsでGraph変更通知を受け取る
Azure Event HubsでGraph変更通知を受け取るAzure Event HubsでGraph変更通知を受け取る
Azure Event HubsでGraph変更通知を受け取る
 
msal.js v2を触る
msal.js v2を触るmsal.js v2を触る
msal.js v2を触る
 
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
僕はあなたを監視する(MS Graph Subscriptionのβで公開されたpresencesを使おう!)
 
TeamsのチャネルとやりとりするWeb Applicationを作ったお話
TeamsのチャネルとやりとりするWeb Applicationを作ったお話TeamsのチャネルとやりとりするWeb Applicationを作ったお話
TeamsのチャネルとやりとりするWeb Applicationを作ったお話
 
Azure AD Application を使用した認証のアレコレ
Azure AD Applicationを使用した認証のアレコレAzure AD Applicationを使用した認証のアレコレ
Azure AD Application を使用した認証のアレコレ
 
Microsoft Graphの変更通知で遊ぶ
Microsoft Graphの変更通知で遊ぶMicrosoft Graphの変更通知で遊ぶ
Microsoft Graphの変更通知で遊ぶ
 
Microsoft Graphを使ってアプリケーションを作った時の話
Microsoft Graphを使ってアプリケーションを作った時の話Microsoft Graphを使ってアプリケーションを作った時の話
Microsoft Graphを使ってアプリケーションを作った時の話
 
Microsoft Graphことはじめ クエリパラメータ編
Microsoft Graphことはじめ クエリパラメータ編Microsoft Graphことはじめ クエリパラメータ編
Microsoft Graphことはじめ クエリパラメータ編
 
Microsoft Graph完全に理解した気がしてた
Microsoft Graph完全に理解した気がしてたMicrosoft Graph完全に理解した気がしてた
Microsoft Graph完全に理解した気がしてた
 
AzureADの認証で失敗した話
AzureADの認証で失敗した話AzureADの認証で失敗した話
AzureADの認証で失敗した話
 
msal.jsを使う
msal.jsを使うmsal.jsを使う
msal.jsを使う
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Microsoft Graph Toolkitを使ってGraph開発を体験しよう

  • 1. Microsoft Graph Toolkitを使ってGraph開発を体験しよう 2021.06 第3回Japan M365 Dev User Group勉強会 #M365Dev
  • 2. 誰? Takas(@DevTakas) Angular / Azure / .NET Core / Azure DevOps / Microsoft Graph Microsoft MVP Office Development #M365Dev
  • 4. おしながき 1. Microsoft Graph Toolkitとは 2. Microsoft Graph Toolkitを使ってみよう 3. ソースコードを眺めてみよう 4. Build2021で発表された内容 5. まとめ #M365Dev
  • 5. Microsoft Graph Toolkitとは - 公式のドキュメントから Microsoft Graph Toolkitコンポーネントは、Web アプリケーション、SharePoint Web パーツ、または Microsoft Teams タブに簡単に追加できます。 コンポーネントは Web 標準に基づいており、プレーンな JavaScript プロジェクトまたは Reach、Angular、Vue.js などの一般的な Web フレームワークの両方で使用 できます。 #M365Dev
  • 6. Microsoft Graph Toolkitとは - 公式のドキュメントから • JavaScriptライブラリ • 大雑把に分けて2つの機能が提供される • Web Componentで提供されるコントロール群 • データアクセスをサポートしてくれるプロバイダー群 #M365Dev
  • 7. Microsoft Graph Toolkitとは -Graph開発ってめっちゃ大変 • 認証を行うライブラリの知識 • (使用するのであれば)GraphClientの知識 • それを組み合わせる手段 • HTML/JS/CSS • Graphで提供される情報について #M365Dev
  • 8. Microsoft Graph Toolkitとは -Component • 提供されるコントロールについて • Web Componentで提供される • HTML標準の<div>やらと同じように mgtが提供するControlをHTMLテンプレート上で記述できる • 例えば、HTMLで下記の記述を行うだけでログイン機構込で実装可能 • JSはGraphToolKitを読み込むだけで、自前で実装する箇所はない <mgt-login></mgt-login> #M365Dev
  • 9. Microsoft Graph Toolkitとは -プロバイダ • 認証を簡易に実装するための機能を提供してくれる • msal • SharePoint • Teams • Electron • HTMLテンプレートでもプロバイダの設定を行える #M365Dev
  • 10. Microsoft Graph Toolkitとは • Graph開発でめっちゃらくできる😀 • といっても知識が不要というわけではない • もちろん知識は必要だが敷居はとても下がった #M365Dev
  • 11. Microsoft Graph Toolkitとは - 使い方の学習はどのリソースを行うのが良いのか • Microsoft LearnのGraph関連がおすすめ • Graphの基礎から抑えているので基本からやりたい場合に良い • ぶっちゃけ今回のセッションの内容はここをなぞっている • すでに終了しているがSkillChallengeのコレクションが良い感じ • https://docs.microsoft.com/ja-jp/users/cloudskillschallenge/collections/67pku3g07x08?WT.mc_id=cloudskillschallenge_7ca6c7f7-cc0d-4c31-9b74-5ce5658787e7 #M365Dev
  • 12. Microsoft Graph Toolkitとは - 使い方やどんなコントロールがあるか眺めてみたい • Storybookが提供されておりComponentの使い方など確認可能 • https://mgt.dev/ • JSやCSSもいじれるのでちょい試したい時に使うのも良し • Template使った例もあるのでそれの手本にみるのも有り #M365Dev
  • 13. Microsoft Graph Toolkitを使ってみよう - 基本的な使い方 1. Azure ADアプリケーションを作成する 2. HTML(or npm)でToolkitライブラリを読み込む 3. HTMLテンプレート上でがんばる #M365Dev
  • 14. Microsoft Graph Toolkitを使ってみよう -レイアウトをいじってみる • 各Componentで提供されているカスタムプロパティに指定するのが推奨されている • Componentから提供されているプロパティはDocumentで確認可能 • 既定でライトテーマとダークテーマのCSSセットが提供されている • mgt-light / mgt-dark #M365Dev
  • 15. Microsoft Graph Toolkitを使ってみよう -自分の好きな構成にしてみる • そもそもデータだけで画面構成は自分で好きに組みたい場合 • テンプレートToolkitを使用 • Componentをベースに描画される要素を上書きする • HTMLテンプレートで全部実装可能 • {{プロパティ}}でデータバインドできる • Componentから提供されるプロパティはドキュメントから参照可能 • 実態はGraphのプロパティなのでそっちも抑えておくと尚良 • 困ったら<mgt-get> • リクエストから指定できるのでComponentが存在しないデータにも • テンプレートで使える構文などは👇参照 • https://docs.microsoft.com/ja-jp/graph/toolkit/customize-components/templates #M365Dev
  • 16. ソースコードを眺めてみよう -GitHubのプロジェクト構成を見てみる • samples • 様々な実装サンプルが格納されている • 一番最初はここをみれば良いと思う • packages • 各ライブラリの実装の実態はここ • 構成など • プラクティスの集合体なので自分で作る時の参考に • https://github.com/microsoftgraph/microsoft-graph-toolkit #M365Dev
  • 17. Build2021で発表された内容 • msal2プロバイダが提供開始された • これでSPAアプリケーションでAzureADアプリを構成できる • 👆はPKCE対応されているアプリケーションなので基本 こっちにしたほうが良い • mgt-file/mgt-file-listが提供開始 • OneDriveの中身を参照するComponentとなっている • どちらも最新のライブラリで提供済み • build直後は入ってなかったがいつの間にか合流していた #M365Dev
  • 18. まとめ • Microsoft Graph Toolkitを使用することで簡単に Graphデータを利用したFront開発を行うことができる • フロントだけでなくTeamsやSharePoint開発でも • カスタマイズは容易 • CSSによる変更はもちろん構成からまるっと変更可能 • 爆速で開発できるようになるのでどんどん活用していこう • JS/CSSそこまで弄らなくても良いのでPoCとか初心者の学習にも最適 #M365Dev
  • 19. 参考ページ • Microsoft Graph Playground • https://mgt.dev/ • Microsoft Graph Toolkit: Microsoft サービスの UI コンポーネントと認証プロバイダー Graph • https://docs.microsoft.com/ja-jp/graph/toolkit/overview • Microsoft Graph ツールキットを使ってアプリを開発 • https://docs.microsoft.com/ja-jp/learn/paths/m365-msgraph-toolkit/ • microsoft-grah-toolkit • https://github.com/microsoftgraph/microsoft-graph-toolkit #M365Dev