mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
c4c253a03a
Two tenants clicked the migration banner, consented the new app, and were refused by the role-superset probe without ever learning why: the previous app's service principal holds a tenant-side add-on grant (DeviceManagementScripts.Read.All) that no re-consent can produce, and the grant command on the Optional Graph capabilities page pre-fills the homed (previous) app. Backend: the probe now separates manifest roles (still propagating after consent ⇒ transient, the retry converges) from add-on roles (permanent ⇒ MissingRoles names them). consent-status and access-check carry appHomingPending + appHomingMissingRoles; the manual flip's probe payload carries missingRoles. The access-check invalidates the Graph caches BEFORE the homing probe so "Detect existing access" judges a fresh primary token after the admin's grant. Web: TenantConfigContext learns the blocking roles from either response and the post-consent poll keeps going while the switch is still converging (previously it stopped on the first legacy-side reconcile and left the tenant un-switched). Settings → Autopilot Validation shows a "One more step" banner with the roles, the grant command pre-filled with the NEW app's client id and -Permissions, and the re-check button; the admin flip error names the roles too. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>