macOS 27: Accessibility granted via MDM doesn’t cover PostEvent, and leaves a stray TCC managed_overrides row after unenrollment

Our app uses an active CGEventTap (kCGEventTapOptionDefault, mouse down/up events) and relies on the Accessibility permission (Device Control & Data Access).

CGEventTapCreate(kCGAnnotatedSessionEventTap,
                 kCGHeadInsertEventTap,
                 kCGEventTapOptionDefault,
                 CGEventMaskBit(kCGEventLeftMouseDown)  | CGEventMaskBit(kCGEventLeftMouseUp)  |
                 CGEventMaskBit(kCGEventRightMouseDown) | CGEventMaskBit(kCGEventRightMouseUp) |
                 CGEventMaskBit(kCGEventOtherMouseDown) | CGEventMaskBit(kCGEventOtherMouseUp),
                 callback, refcon);

On macOS 27.0.1 we see two behaviours when that permission comes from MDM, and we’d like to know whether they’re expected.

According to the PrivacyPreferencesPolicyControl.Services documentation, the PPPC Accessibility key is deprecated in macOS 27. It’s replaced by the Privacy → PermissionDefaults setting in the declarative configuration com.apple.configuration.app.settings, and the managed value is a default that the user can change. We tested both the PPPC payload and the DDM configuration.

1. Managed Accessibility grant doesn’t cover PostEvent

When the user turns on Accessibility manually in System Settings > Privacy & Security > Accessibility, the event tap works with no further prompts.

When Accessibility comes from device management (a PPPC payload or DDM PermissionDefaults):

  • AXIsProcessTrusted() returns true.
  • On the first click through the tap, macOS shows the “control this computer” prompt.
  • tccd adds an access row for kTCCServicePostEvent with auth_value 0 and auth_reason 4.
  • At the same moment, the app’s Accessibility toggle in System Settings switches off. The managed Accessibility row remains auth_value 2, auth_reason 6.
  • After the user accepts the prompt, PostEvent changes to auth_value 2 and the tap works from then on.

Questions :

  • Why does a manual Accessibility grant cover an active event tap, while a managed Accessibility default needs a separate PostEvent grant?
  • With PPPC Accessibility deprecated, is DDM Accessibility plus PPPC PostEvent (Allowed) the intended configuration for apps that install active event taps?

2. Stray managed_overrides row after unenrollment

On macOS 27, the managed Accessibility value is stored in a new managed_overrides table in /Library/Application Support/com.apple.TCC/TCC.db (schema version 36). On macOS 15 and 26, managed grants were kept in MDMOverrides.plist, and this table doesn’t exist there.

Steps :

  • Enroll a never-managed Mac in MDM with user-approved enrollment.
  • Install a profile that grants Accessibility to our app. tccd logs ManagedSettings: inserted managed_overrides for kTCCServiceAccessibility:<bundle id> admin_auth_value=2 auth_value=2. The row is written with policy_id NULL, and policies and active_policy stay empty.
  • Remove the MDM profile from System Settings > General > Device Management.

What happens:

  • mdmclient removes the MDM profile first. Removing each TCC payload after that fails with :
PlugIn: DetermineUninstallFlags [TCCProfileService] Error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" UserInfo={NSLocalizedDescription=The profile must originate from a user-approved MDM server.}
  • The profiles disappear, MDMOverrides.plist is deleted, and profiles status reports no MDM enrollment.
  • The row remains, with auth_value 1, auth_reason 6 (MDM Policy), policy_id NULL, admin_auth_value 2 and flags 480.
  • tccutil reset Accessibility <bundle id> clears flags but doesn’t remove the row.
  • Later permission prompts and System Settings toggles for the app write to this row instead of to access.

Why does the row stay after unenrollment? Is there a supported way to clear it?

1_tcc_state_after_granting_post_event.txt(1.2 KB)
1_tcc_state_after_enrollment.txt(928 bytes)
1_tcc_state_after_unenrollment.txt(1.1 KB)
1_tcc_state_triggering_the_tap.txt(1.2 KB)
1_tcc_state_after_tccutil_reset_accessibility.txt(841 bytes)
MDMOverrides_plist.txt(7.1 KB)
tccd_log_excerpt.txt(16 KB)
1_tcc_state_before_enrollment.txt(409 bytes)
TCC_tables_macOS15_26_27.txt(17 KB)

Also seeing this here. Regarding 2., I believe we already back for the 27.0 betas and have not seen any updates about since (FB24604618).

macOS 27.3 beta 2 makes this a lot worse because now there is no way anymore through the UI to ever again give an app PostEvent consent after un-enrolling or removing the PPPCs (FB25626409).

Thanks for filing those bugs.

Regarding your second issue (FB25626409) we believe we know what’s going on there but the fix isn’t in any seeded version of macOS. As always, I encourage you to retest on new betas as they are seeded.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"