entra-app-registration
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Azure RBAC or role assignments (use azure-rbac), Key Vault secrets (use azure-keyvault-expiration-audit), Azure resource security (use azure-security).
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o entra-app-registration.zip https://jpskill.com/download/19683.zip && unzip -o entra-app-registration.zip && rm entra-app-registration.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19683.zip -OutFile "$d\entra-app-registration.zip"; Expand-Archive "$d\entra-app-registration.zip" -DestinationPath $d -Force; ri "$d\entra-app-registration.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
entra-app-registration.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
entra-app-registrationフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 16
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
概要
Microsoft Entra ID (旧 Azure Active Directory) は、Microsoft のクラウドベースの ID およびアクセス管理サービスです。アプリ登録により、アプリケーションはユーザーを認証し、Azure リソースに安全にアクセスできます。
主要な概念
| 概念 | 説明 |
|---|---|
| アプリ登録 | アプリが Microsoft ID プラットフォームを使用できるようにする構成 |
| アプリケーション (クライアント) ID | アプリケーションの一意の識別子 |
| テナント ID | Azure AD テナント/ディレクトリの一意の識別子 |
| クライアント シークレット | アプリケーションのパスワード (機密クライアントのみ) |
| リダイレクト URI | 認証応答が送信される URL |
| API アクセス許可 | アプリが要求するアクセス スコープ |
| サービス プリンシパル | アプリを登録したときにテナントで作成される ID |
アプリケーションの種類
| 種類 | ユースケース |
|---|---|
| Web アプリケーション | サーバーサイド アプリ、API |
| シングルページ アプリ (SPA) | JavaScript/React/Angular アプリ |
| モバイル/ネイティブ アプリ | デスクトップ、モバイル アプリ |
| デーモン/サービス | バックグラウンド サービス、API |
コア ワークフロー
ステップ 1: アプリケーションを登録する
Azure ポータルまたは Azure CLI を使用してアプリ登録を作成します。
ポータルでの方法:
- Azure ポータル → Microsoft Entra ID → アプリ登録 に移動します
- 「新規登録」をクリックします
- 名前、サポートされているアカウントの種類、およびリダイレクト URI を入力します
- 「登録」をクリックします
CLI での方法: references/cli-commands.md を参照してください IaC での方法: references/BICEP-EXAMPLE.bicep を参照してください
プロジェクトで既に IaC を使用している場合、多数のアプリ登録を管理するためのスケーラブルなソリューションが必要な場合、または構成変更のきめ細かな監査履歴が必要な場合は、IaC を使用して Entra アプリ登録を管理することを強くお勧めします。
ステップ 2: 認証を構成する
アプリケーションの種類に基づいて認証設定を行います。
- Web アプリ: リダイレクト URI を追加し、必要に応じて ID トークンを有効にします
- SPA: リダイレクト URI を追加し、必要に応じて暗黙的な許可フローを有効にします
- モバイル/デスクトップ:
http://localhostまたはカスタム URI スキームを使用します - サービス: クライアント資格情報フローにはリダイレクト URI は不要です
ステップ 3: API アクセス許可を構成する
アプリケーションに Microsoft API または独自の API にアクセスするアクセス許可を付与します。
一般的な Microsoft Graph アクセス許可:
User.Read- ユーザー プロファイルの読み取りUser.ReadWrite.All- すべてのユーザーの読み取りと書き込みDirectory.Read.All- ディレクトリ データの読み取りMail.Send- ユーザーとしてメールを送信
詳細: references/api-permissions.md を参照してください
ステップ 4: クライアント資格情報を作成する (必要な場合)
機密クライアント アプリケーション (Web アプリ、サービス) の場合は、クライアント シークレット、証明書、またはフェデレーション ID 資格情報を作成します。
クライアント シークレット:
- 「証明書とシークレット」に移動します
- 新しいクライアント シークレットを作成します
- 値をすぐにコピーします (一度しか表示されません)
- 安全に保管します (Key Vault を推奨)
証明書: 実稼働環境では、セキュリティ強化のため、シークレットの代わりに証明書を使用します。「証明書とシークレット」セクションから証明書をアップロードします。
フェデレーション ID 資格情報: 機密クライアントを Entra プラットフォームに動的に認証するために使用します。
ステップ 5: OAuth フローを実装する
OAuth フローをアプリケーション コードに統合します。
参照:
- references/oauth-flows.md - OAuth 2.0 フローの詳細
- references/console-app-example.md - コンソール アプリの実装
一般的なパターン
パターン 1: 初めてのアプリ登録
ユーザーに初めてのアプリ登録を段階的に案内します。
必要な情報:
- アプリケーション名
- アプリケーションの種類 (Web、SPA、モバイル、サービス)
- リダイレクト URI (該当する場合)
- 必要なアクセス許可
スクリプト: references/first-app-registration.md を参照してください
パターン 2: ユーザー認証付きコンソール アプリケーション
ユーザーを認証する .NET/Python/Node.js コンソール アプリを作成します。
必要な情報:
- プログラミング言語 (C#、Python、JavaScript など)
- 認証ライブラリ (MSAL を推奨)
- 必要なアクセス許可
例: references/console-app-example.md を参照してください
パターン 3: サービス間認証
ユーザー操作なしでデーモン/サービス認証を設定します。
必要な情報:
- サービス/アプリ名
- ターゲット API/リソース
- シークレットまたは証明書を使用するかどうか
実装: クライアント資格情報フローを使用します (references/oauth-flows.md#client-credentials-flow を参照してください)
MCP ツールと CLI
Azure CLI コマンド
| コマンド | 目的 |
|---|---|
az ad app create |
新しいアプリ登録を作成する |
az ad app list |
アプリ登録を一覧表示する |
az ad app show |
アプリの詳細を表示する |
az ad app permission add |
API アクセス許可を追加する |
az ad app credential reset |
新しいクライアント シークレットを生成する |
az ad sp create |
サービス プリンシパルを作成する |
完全なリファレンス: references/cli-commands.md を参照してください
Microsoft Authentication Library (MSAL)
MSAL は、Microsoft ID プラットフォームを統合するための推奨ライブラリです。
サポートされている言語:
- .NET/C# -
Microsoft.Identity.Client - JavaScript/TypeScript -
@azure/msal-browser,@azure/msal-node - Python -
msal
例: references/console-app-example.md を参照してください
セキュリティのベスト プラクティス
| プラクティス | 推奨事項 |
|---|---|
| シークレットをハードコードしない | 環境変数、Azure Key Vault、またはマネージド ID を使用する |
| シークレットを定期的にローテーションする | 有効期限を設定し、ローテーションを自動化する |
| シークレットよりも証明書を使用する | 実稼働環境ではより安全 |
| 最小特権のアクセス許可 | 必要な API アクセス許可のみを要求する |
| MFA を有効にする | ユーザーに多要素認証を要求する |
| マネージド ID を使用する | Azure ホスト型アプリの場合、シークレットを回避する |
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Overview
Microsoft Entra ID (formerly Azure Active Directory) is Microsoft's cloud-based identity and access management service. App registrations allow applications to authenticate users and access Azure resources securely.
Key Concepts
| Concept | Description |
|---|---|
| App Registration | Configuration that allows an app to use Microsoft identity platform |
| Application (Client) ID | Unique identifier for your application |
| Tenant ID | Unique identifier for your Azure AD tenant/directory |
| Client Secret | Password for the application (confidential clients only) |
| Redirect URI | URL where authentication responses are sent |
| API Permissions | Access scopes your app requests |
| Service Principal | Identity created in your tenant when you register an app |
Application Types
| Type | Use Case |
|---|---|
| Web Application | Server-side apps, APIs |
| Single Page App (SPA) | JavaScript/React/Angular apps |
| Mobile/Native App | Desktop, mobile apps |
| Daemon/Service | Background services, APIs |
Core Workflow
Step 1: Register the Application
Create an app registration in the Azure portal or using Azure CLI.
Portal Method:
- Navigate to Azure Portal → Microsoft Entra ID → App registrations
- Click "New registration"
- Provide name, supported account types, and redirect URI
- Click "Register"
CLI Method: See references/cli-commands.md IaC Method: See references/BICEP-EXAMPLE.bicep
It's highly recommended to use the IaC to manage Entra app registration if you already use IaC in your project, need a scalable solution for managing lots of app registrations or need fine-grained audit history of the configuration changes.
Step 2: Configure Authentication
Set up authentication settings based on your application type.
- Web Apps: Add redirect URIs, enable ID tokens if needed
- SPAs: Add redirect URIs, enable implicit grant flow if necessary
- Mobile/Desktop: Use
http://localhostor custom URI scheme - Services: No redirect URI needed for client credentials flow
Step 3: Configure API Permissions
Grant your application permission to access Microsoft APIs or your own APIs.
Common Microsoft Graph Permissions:
User.Read- Read user profileUser.ReadWrite.All- Read and write all usersDirectory.Read.All- Read directory dataMail.Send- Send mail as a user
Details: See references/api-permissions.md
Step 4: Create Client Credentials (if needed)
For confidential client applications (web apps, services), create a client secret, certificate or federated identity credential.
Client Secret:
- Navigate to "Certificates & secrets"
- Create new client secret
- Copy the value immediately (only shown once)
- Store securely (Key Vault recommended)
Certificate: For production environments, use certificates instead of secrets for enhanced security. Upload certificate via "Certificates & secrets" section.
Federated Identity Credential: For dynamically authenticating the confidential client to Entra platform.
Step 5: Implement OAuth Flow
Integrate the OAuth flow into your application code.
See:
- references/oauth-flows.md - OAuth 2.0 flow details
- references/console-app-example.md - Console app implementation
Common Patterns
Pattern 1: First-Time App Registration
Walk user through their first app registration step-by-step.
Required Information:
- Application name
- Application type (web, SPA, mobile, service)
- Redirect URIs (if applicable)
- Required permissions
Script: See references/first-app-registration.md
Pattern 2: Console Application with User Authentication
Create a .NET/Python/Node.js console app that authenticates users.
Required Information:
- Programming language (C#, Python, JavaScript, etc.)
- Authentication library (MSAL recommended)
- Required permissions
Example: See references/console-app-example.md
Pattern 3: Service-to-Service Authentication
Set up daemon/service authentication without user interaction.
Required Information:
- Service/app name
- Target API/resource
- Whether to use secret or certificate
Implementation: Use Client Credentials flow (see references/oauth-flows.md#client-credentials-flow)
MCP Tools and CLI
Azure CLI Commands
| Command | Purpose |
|---|---|
az ad app create |
Create new app registration |
az ad app list |
List app registrations |
az ad app show |
Show app details |
az ad app permission add |
Add API permission |
az ad app credential reset |
Generate new client secret |
az ad sp create |
Create service principal |
Complete reference: See references/cli-commands.md
Microsoft Authentication Library (MSAL)
MSAL is the recommended library for integrating Microsoft identity platform.
Supported Languages:
- .NET/C# -
Microsoft.Identity.Client - JavaScript/TypeScript -
@azure/msal-browser,@azure/msal-node - Python -
msal
Examples: See references/console-app-example.md
Security Best Practices
| Practice | Recommendation |
|---|---|
| Never hardcode secrets | Use environment variables, Azure Key Vault, or managed identity |
| Rotate secrets regularly | Set expiration, automate rotation |
| Use certificates over secrets | More secure for production |
| Least privilege permissions | Request only required API permissions |
| Enable MFA | Require multi-factor authentication for users |
| Use managed identity | For Azure-hosted apps, avoid secrets entirely |
| Validate tokens | Always validate issuer, audience, expiration |
| Use HTTPS only | All redirect URIs must use HTTPS (except localhost) |
| Monitor sign-ins | Use Entra ID sign-in logs for anomaly detection |
SDK Quick References
- Azure Identity: Python | .NET | TypeScript | Java | Rust
- Key Vault (secrets): Python | TypeScript
- Auth Events: .NET
References
- OAuth Flows - Detailed OAuth 2.0 flow explanations
- CLI Commands - Azure CLI reference for app registrations
- Console App Example - Complete working examples
- First App Registration - Step-by-step guide for beginners
- API Permissions - Understanding and configuring permissions
- Troubleshooting - Common issues and solutions
External Resources
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (8,220 bytes)
- 📎 references/api-permissions.md (10,198 bytes)
- 📎 references/BICEP-EXAMPLE.bicep (5,328 bytes)
- 📎 references/cli-commands.md (8,852 bytes)
- 📎 references/console-app-example.md (11,005 bytes)
- 📎 references/first-app-registration.md (7,415 bytes)
- 📎 references/oauth-flows.md (9,540 bytes)
- 📎 references/sdk/azure-identity-dotnet.md (703 bytes)
- 📎 references/sdk/azure-identity-java.md (983 bytes)
- 📎 references/sdk/azure-identity-py.md (879 bytes)
- 📎 references/sdk/azure-identity-rust.md (805 bytes)
- 📎 references/sdk/azure-identity-ts.md (900 bytes)
- 📎 references/sdk/azure-keyvault-py.md (1,017 bytes)
- 📎 references/sdk/azure-keyvault-secrets-ts.md (942 bytes)
- 📎 references/sdk/microsoft-azure-webjobs-extensions-authentication-events-dotnet.md (1,522 bytes)
- 📎 references/troubleshooting.md (7,594 bytes)