namespace AutopilotMonitor.Shared.Models.Graph { /// /// Constant catalog of Microsoft Graph application permission names referenced by the /// Autopilot Monitor backend. Centralised so feature toggles, the customer-side grant /// script, and the runtime permission detector cannot drift apart. /// public static class GraphAppPermissions { /// /// Core enrollment device-validation permission. Required to read /// windowsAutopilotDeviceIdentities (Autopilot Device Validation) and /// importedDeviceIdentities (Corporate Identifier Validation). Part of the /// publisher manifest's default-consent set — present in the SP's token roles /// claim once admin consent has been granted by anyone in the tenant. Used by the /// access-check probe to silently reconcile pre-approved consent. /// public const string DeviceManagementServiceConfigReadAll = "DeviceManagementServiceConfig.Read.All"; /// Read display names + file names of Intune device management scripts (Platform Scripts + Remediations). public const string DeviceManagementScriptsReadAll = "DeviceManagementScripts.Read.All"; /// Read Intune configuration profiles (future use — policy display names). public const string DeviceManagementConfigurationReadAll = "DeviceManagementConfiguration.Read.All"; /// Read Intune managed apps (future use — Win32 app display names not yet covered). public const string DeviceManagementAppsReadAll = "DeviceManagementApps.Read.All"; /// /// Read Intune managed device objects (deviceManagement/managedDevices). Optional /// add-on permission backing Intune Enrollment Validation, which resolves the managedDevice /// id carried in the agent's client certificate in the tenant it claims. Not part of the /// default-consent set — must be granted per tenant. /// public const string DeviceManagementManagedDevicesReadAll = "DeviceManagementManagedDevices.Read.All"; /// /// Read Windows 365 Cloud PC objects (virtualEndpoint/cloudPCs). Optional add-on /// permission backing the W365 Cloud PC device validator — Cloud PCs are never /// Autopilot-registered, so validation resolves them through the service-side Cloud PC /// inventory instead. /// public const string CloudPCReadAll = "CloudPC.Read.All"; /// /// Application roles the published app manifest requests — the set a tenant-wide admin /// consent grants by itself. Everything else a service principal holds is a tenant-side /// add-on grant () that no re-consent can produce. /// public static readonly string[] DefaultConsentSet = { DeviceManagementServiceConfigReadAll }; } }