Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Application insightsを用いてAzure AD B2Cをより使いこなす
Search
Mitsuzono Hiroto
June 18, 2020
Technology
0
510
Application insightsを用いてAzure AD B2Cをより使いこなす
Alternative Architecture DOJO #4
Mitsuzono Hiroto
June 18, 2020
Tweet
Share
More Decks by Mitsuzono Hiroto
See All by Mitsuzono Hiroto
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
310
ここらでGPSマルチユニットが如何に使いやすいか本気で説明するから聞きなさい
mitsuzono
0
1.1k
Application Insights と KQL
mitsuzono
0
490
LINE Messaging API メッセージ送受信とアカウント連携まわり
mitsuzono
0
81
Application Insights と Cosmos DB ―たかがTips、そう思ってないですか?―
mitsuzono
0
49
近頃若者のサーバー離れが深刻化しています
mitsuzono
0
860
新卒、ヘルキャンプとデスマーチへの挑戦
mitsuzono
0
360
Other Decks in Technology
See All in Technology
類似ロジック実装をiOS/Android間で合わせる道標No.1
fumiyasac0921
1
220
Secrets of a PowerShell "Guru"
guyrleech
1
120
RailsConf 2024 Keynote "Startups on Rails in 2024"
irinanazarova
0
770
使われないものを作るな!出口から作るデータ分析基盤 / Data Platform Development Starting from the User Needs
amaotone
16
4.4k
AI JIMY - 登壇(インストール編)
hanacchi
0
150
kcp: Kubernetes APIs Are All You Need #techfeed_live / TechFeed Experts Night 28th
ytaka23
1
190
本番環境で Cloudflareを 使ってみた話
miu_crescent
2
120
Dungeons and Dragons and Rails
joelq
0
230
SLOいつ決めましょう?
abnoumaru
2
130
エムスリーQAチーム紹介資料 / Introduction of M3 QA Team
m3_engineering
1
320
From here to resilience - a travel guide
ufried
1
160
パスワードを保存しますか?
hanacchi
0
250
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
81
44k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
The Invisible Side of Design
smashingmag
294
49k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Infographics Made Easy
chrislema
238
18k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
0
120
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Transcript
Azure Application insightsを用いて Azure AD B2Cをより使いこなす 株式会社オルターブース 満園 裕人
• 満園裕人 • 株式会社オルターブース エンジニア • 業務では主にC#(.NET Core)で Webアプリケーション開発を行う 自己紹介
Copyright © Alterbooth Inc. All Rights Reserved. 2
• Application Insights • 概要 • クエリ • Azure AD
B2Cとの組み合わせ • 前準備(カスタムポリシーの構成) • 開発環境での設定、活用方法 • 運用環境での設定、活用方法 目次 Copyright © Alterbooth Inc. All Rights Reserved. 3
Application Insights Copyright © Alterbooth Inc. All Rights Reserved. 4
• アプリケーションパフォーマンス管理サービス • Azure Monitorに統合されている • オートスケールやアラートの条件として利用可能 • Azureポータルからリソース作るとよく勝手についてくる •
が、論理アプリケーション単位でまとめるのがオススメ • アプリ側の設定についてはVisualStudioで行うと楽 • 手動でやるとNugetの設定やら何やらで面倒 Application Insights Copyright © Alterbooth Inc. All Rights Reserved. 5
• Azure Data Explorerで使われる読み取り専用クエリ • Application Insightsの「ログ」ボタンから見れる KQL (Kusto Query
Language)
Azure AD B2C + Application Insights Copyright © Alterbooth Inc.
All Rights Reserved. 7
• Azure AD B2Cでカスタムポリシーを構成する必要がある • 「カスタムポリシーの概要」ページの手順に沿って作成 • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/custom-policy-get-started •
主に↑のカスタムポリシーを書き換えていく前提の内容になって います Application Insightsを追加する前作業 Copyright © Alterbooth Inc. All Rights Reserved. 8
Application Insightsの活用 ―開発環境編― Copyright © Alterbooth Inc. All Rights Reserved.
9
• Azure AD B2CはApplication Insightsへのデータ送信機能をもつ • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/troubleshoot-with-application-insights • IDプロバイダーとの間で送受信されるすべての要求を収集
• 開発者モードで配置されている場合にのみ収集される • 手順 • Application Insightsのリソースを作成、キーを取得 • カスタムポリシーを構成(今回はSignUpOrSignin.xmlを編集) カスタムポリシーの問題を診断(開発環境のみ) Copyright © Alterbooth Inc. All Rights Reserved. 10
カスタムポリシーの問題を診断(開発環境のみ) Copyright © Alterbooth Inc. All Rights Reserved. 11
• トレースログとして出力される • ログの活用例 • 細かい情報が見れる • エラーが起きたときの原因調査 • 取れる情報の把握
• 運用環境でのログ出力(後述)で使う プロパティ名の確認など カスタムポリシーの問題を診断(開発環境のみ) Copyright © Alterbooth Inc. All Rights Reserved. 12
Application Insightsの活用 ―運用環境編― Copyright © Alterbooth Inc. All Rights Reserved.
13
• 前述のものより細かい設定が必要 • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/analytics-with-application-insights • 今回はTrustFrameworkBase.xmlと TrustFrameworkBaseExtensions.xmlを編集します(割愛) • カスタムイベントとして出力される
• ユーザー動作の追跡が可能 ユーザー体験のイベントログ収集(運用環境含む) Copyright © Alterbooth Inc. All Rights Reserved. 14
• 「(省略可)さらにデータを収集する」項目の補足 • Object IDや外部アカウントのIDを取りたい場合もここに追記 ユーザー体験のイベントログ収集(運用環境含む) Copyright © Alterbooth Inc.
All Rights Reserved. 15
• LINE ユーザーIDも取れる! ユーザー体験のイベントログ収集(運用環境含む) Copyright © Alterbooth Inc. All Rights
Reserved. 16
• LINE ユーザーIDでフィルタリングもできる! ユーザー体験のイベントログ収集(運用環境含む) Copyright © Alterbooth Inc. All Rights
Reserved. 17
まとめ Copyright © Alterbooth Inc. All Rights Reserved. 18
• Application Insightsを組み合わせることによって… • 開発時のカスタムポリシーのデバッグを効率化できる • エラー詳細 • ログとして取れる情報の確認 •
運用時もエラーの検知や原因特定が行いやすくなる • 必要な情報のみに絞るための設定が必要 • アラートルールの追加&Webhookの設定が可能に まとめ Copyright © Alterbooth Inc. All Rights Reserved. 19
• カスタムポリシーの概要 • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/custom-policy-get-started • カスタムポリシーのトラブルシューティング • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/troubleshoot-with-application-insights
• ユーザー動作の追跡 • https://docs.microsoft.com/ja-jp/azure/active-directory- b2c/analytics-with-application-insights 参考ドキュメント Copyright © Alterbooth Inc. All Rights Reserved. 20
ご清聴ありがとうございました! Copyright © Alterbooth Inc. All Rights Reserved. 21