entra-app-registration

Configure Microsoft Entra ID app registrations, OAuth 2.0 flows, and MSAL authentication.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill entra-app-registration-alahmadiq8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entra-app-registration
Source: https://github.com/AlahmadiQ8/sre-agent-demo/tree/main/.claude/skills/entra-app-registration
Command: npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill entra-app-registration-alahmadiq8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Microsoft Entra ID (formerly Azure AD) authentication involves many error-prone steps: creating app registrations, choosing OAuth flows, configuring API permissions, and integrating MSAL. This Skill guides you through the entire process with step-by-step instructions, CLI commands, and working code examples. ## Core Features & Use Cases - App Registration Setup: Create and configure app registrations via Azure Portal, Azure CLI, or Bicep, including redirect URIs, sign-in audience, and client credentials. - OAuth 2.0 Flow Guidance: Implement authorization code flow with PKCE, client credentials, device code, and refresh token flows with detailed protocol walkthroughs. - MSAL Integration Examples: Complete working console app examples in C#, Python, and Node.js that authenticate users and call Microsoft Graph. - Use Case: You need a background service that reads all users via Microsoft Graph. This Skill walks you through registering the app, adding the User.Read.All application permission, granting admin consent, and implementing the client credentials flow. ## Quick Start Ask the assistant to create a new Microsoft Entra app registration for a console app with User.Read permission and show the MSAL code to authenticate.

Frequently Asked Questions about entra-app-registration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an app registration in Microsoft Entra ID?

Create an app registration via the Azure Portal under Microsoft Entra ID > App registrations > New registration, or run az ad app create with a display name and redirect URIs. Save the Application (client) ID and Tenant ID shown on the overview page.

How to add Microsoft Graph API permissions to an app registration?

Add permissions in the Portal under API permissions > Add a permission > Microsoft Graph, choosing delegated or application type. With CLI, use az ad app permission add with the permission ID, then run az ad app permission admin-consent for application permissions.

What is the difference between delegated and application permissions?

Delegated permissions let the app act on behalf of a signed-in user and are limited by the user's rights. Application permissions let the app act with its own identity for background services and always require admin consent.

Should I use DefaultAzureCredential in production?

No, DefaultAzureCredential is recommended for local development only because its fallback chain adds latency and unpredictability. In production, use ManagedIdentityCredential for Azure-hosted apps or ClientCertificateCredential for on-premises workloads.

Why do I get AADSTS50011 redirect URI mismatch errors?

This error occurs when the redirect URI in your request does not exactly match a registered URI, including case and trailing slashes. Verify the URI is registered under the correct platform type (Web, SPA, or Public client) in the Authentication section.

When should I use certificates instead of client secrets?

Use certificates for production environments because they are more secure than secrets and avoid storing passwords. Client secrets are acceptable for development but must be stored securely, rotated regularly, and never committed to source control.