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
630
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
730
ここらでGPSマルチユニットが如何に使いやすいか本気で説明するから聞きなさい
mitsuzono
0
1.5k
Application Insights と KQL
mitsuzono
0
590
LINE Messaging API メッセージ送受信とアカウント連携まわり
mitsuzono
0
120
Application Insights と Cosmos DB ―たかがTips、そう思ってないですか?―
mitsuzono
0
78
近頃若者のサーバー離れが深刻化しています
mitsuzono
0
1k
新卒、ヘルキャンプとデスマーチへの挑戦
mitsuzono
0
470
Other Decks in Technology
See All in Technology
やる気のない自分との向き合い方/How to Deal with Your Unmotivated Self
sanogemaru
0
460
Modern_Data_Stack最新動向クイズ_買収_AI_激動の2025年_.pdf
sagara
0
240
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
AIツールでどこまでデザインを忠実に実装できるのか
oikon48
6
3.2k
AI時代こそ求められる設計力- AWSクラウドデザインパターン3選で信頼性と拡張性を高める-
kenichirokimura
3
280
Azure Well-Architected Framework入門
tomokusaba
1
350
「使い方教えて」「事例教えて」じゃもう遅い! Microsoft 365 Copilot を触り倒そう!
taichinakamura
0
320
20251007: What happens when multi-agent systems become larger? (CyberAgent, Inc)
ornew
1
170
三菱電機・ソニーグループ共同の「Agile Japan企業内サテライト」_2025
sony
0
140
Uncle Bobの「プロフェッショナリズムへの期待」から学ぶプロの覚悟
nakasho
2
110
衛星画像超解像化によって実現する2D, 3D空間情報の即時生成と“AI as a Service”/ Real-time generation spatial data enabled_by satellite image super-resolution
lehupa
0
140
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
3
5.5k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
The Cost Of JavaScript in 2023
addyosmani
54
9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
How GitHub (no longer) Works
holman
315
140k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Typedesign – Prime Four
hannesfritz
42
2.8k
What's in a price? How to price your products and services
michaelherold
246
12k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Mobile First: as difficult as doing things right
swwweet
224
10k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
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