🧩 Application Registration

An Application Registration defines the blueprint of an application in Microsoft Entra ID. It contains the global configuration that all Service Principals are created from and provides the client identity used for OAuth2 authentication in the homelab.

This page explains what an Application Registration is and how to configure one correctly for internal apps, OAuth2 Proxy, and automation roles.


🎯 Purpose in the Homelab

Application Registrations are used to:

In short:

Application Registration = identity definition
Service Principal = identity instance used by automation


🛠️ How to Configure an Application Registration

Below is the contributor‑friendly, step‑by‑step configuration process used across the homelab.


1️⃣ Create the Application Registration

Azure Portal → Microsoft Entra ID → App registrations → New registration

Fill out:

Click Register.


2️⃣ Record the Application (Client) ID

After creation, copy:

These values are required by:

Store them in your secrets workflow or Ansible Vault.


3️⃣ Configure Redirect URIs

Navigate to:

Authentication → Redirect URIs

Add all callback URLs used by your reverse proxy or internal apps.

Examples:

https://auth.refol.us/oauth2/callback
https://grafana.refol.us/oauth2/callback
https://proxmox.refol.us/oauth2/callback

Enable:

These are required for OAuth2 Proxy.


4️⃣ Assign Required API Permissions

Most homelab apps only need:

For automation roles (Ansible, CI/CD), permissions are typically handled through RBAC, not Graph API scopes.

If an app requires additional Graph scopes, document them explicitly in the related service page.


5️⃣ Generate Credentials (Secret or Certificate)

Option A — Client Secret (simple, short‑lived)

Certificates & secrets → New client secret

Option B — Certificate (preferred for automation)

Upload a public certificate generated by your automation role.

Certificates provide:


6️⃣ Verify the Service Principal

Entra ID automatically creates a Service Principal for the Application Registration.

Find it under:

Enterprise applications → All applications

This is the identity you assign RBAC roles to.


7️⃣ Assign RBAC Roles (If Needed)

For automation or API access:

Azure Portal → Subscriptions / Resource Groups → Access control (IAM)

Assign roles to the Service Principal, not the Application Registration.

Common homelab roles:

Use least‑privilege principles.


📘 Example: OAuth2 Proxy Application Registration

A typical OAuth2 Proxy registration includes:


🔧 Example: Automation (Ansible) Application Registration