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
590
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
640
ここらでGPSマルチユニットが如何に使いやすいか本気で説明するから聞きなさい
mitsuzono
0
1.4k
Application Insights と KQL
mitsuzono
0
550
LINE Messaging API メッセージ送受信とアカウント連携まわり
mitsuzono
0
110
Application Insights と Cosmos DB ―たかがTips、そう思ってないですか?―
mitsuzono
0
69
近頃若者のサーバー離れが深刻化しています
mitsuzono
0
970
新卒、ヘルキャンプとデスマーチへの挑戦
mitsuzono
0
440
Other Decks in Technology
See All in Technology
Amazon Bedrock GenUハンズオン座学資料 #1 GenU環境で生成AIを体験してみよう
tsukuboshi
0
110
Real World Nix CI/CD編
asa1984
1
210
Amazon Bedrock 2025 年の熱いアップデート (2025/3 時点)
icoxfog417
PRO
3
600
もうVPNは古い? VPNを使わずに オンプレサーバーを 管理する手法あれこれ
ebibibi
0
130
AI_Agent_の作り方_近藤憲児
kenjikondobai
19
5k
アジリティを高めるテストマネジメント #QiitaQualityForward
makky_tyuyan
1
850
アウトカムを最大化させるプロダクトエンジニアの動き
hacomono
PRO
0
290
LangGraph × Bedrock による複数の Agentic Workflow を利用した Supervisor 型のマルチエージェントの実現/langgraph-bedrock-supervisor-agent
ren8k
4
540
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
12k
どうすると生き残れないのか/how-not-to-survive
hanhan1978
13
11k
組織拡大でカルチャー崩壊を防ぐためにできること
urahiroshi
0
110
AI-Driven-Development-20250310
yuhattor
3
360
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
KATA
mclloyd
29
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
The Invisible Side of Design
smashingmag
299
50k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Language of Interfaces
destraynor
156
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Music & Morning Musume
bryan
46
6.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
14
1k
GitHub's CSS Performance
jonrohan
1030
460k
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