ADR 0006: Wizard creates the app registrations via device code sign-in

  • Status: Accepted

  • Date: 2026-12-02

Context

Graph app-only access needs an Entra app registration with a credential and admin-consented application permissions. Asking admins to create this by hand is the most error-prone part of setting up backup tools, and the permission list changes as modules are enabled.

Decision

The setup wizard connects to the tenant with a one-time delegated device code sign-in (using the Microsoft Graph Command Line Tools public client by default), then creates and configures separate Backup and Restore app registrations with server-generated certificates, grants only the enabled modules’ permissions, and discards the delegated token. Manual registration remains available as a fallback. Details in First-run setup and tenant connection.

Consequences

  • No pre-work in the Entra portal; setup is fully web-based.

  • Permission changes (module enabled/disabled, certificate renewal) need a new admin sign-in; the app never holds standing rights to change its own permissions.

  • Depends on device code flow being allowed for the admin at setup time; tenants that block it use the manual path or a temporary policy exclusion.

  • Relies on a Microsoft first-party client ID; made configurable in case Microsoft restricts it.