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
720
ここらでGPSマルチユニットが如何に使いやすいか本気で説明するから聞きなさい
mitsuzono
0
1.4k
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
実践アプリケーション設計 ①データモデルとドメインモデル
recruitengineers
PRO
5
1.4k
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
26
12k
AIエージェントの活用に重要な「MCP (Model Context Protocol)」とは何か
masayamoriofficial
0
250
2025年になってもまだMySQLが好き
yoku0825
2
860
そのコンポーネント、サーバー?クライアント?App Router開発のモヤモヤを可視化する補助輪
makotot
4
780
クラウドセキュリティを支える技術と運用の最前線 / Cutting-edge Technologies and Operations Supporting Cloud Security
yuj1osm
2
250
JuniorからSeniorまで: DevOpsエンジニアの成長ロードマップ
yuriemori
2
350
なぜSaaSがMCPサーバーをサービス提供するのか?
sansantech
PRO
4
850
Grafana Meetup Japan Vol. 6
kaedemalu
1
190
個人CLAUDE.md紹介と設定から学んだこと/introduce-my-claude-md
shibayu36
0
150
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
0
130
Nstockの一人目エンジニアが 3年間かけて向き合ってきた セキュリティのこととこれから〜あれから半年〜
yo41sawada
0
150
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
512
110k
The Language of Interfaces
destraynor
160
25k
Practical Orchestrator
shlominoach
190
11k
Six Lessons from altMBA
skipperchong
28
4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Typedesign – Prime Four
hannesfritz
42
2.8k
A better future with KSS
kneath
239
17k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Bash Introduction
62gerente
614
210k
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