Sub topic 14
Controlling which apps can see your data
This chapter assumes you have already added accounts in System Settings and can open the Mail, Calendar, and Contacts apps. Here you will see how macOS decides which other apps may read that data, and how to change those decisions.
How macOS gates access
Your mail, events, and contacts are personal data, so macOS does not let every app read them. When an app first asks for protected data, macOS shows a prompt. Your answer is stored, and macOS applies it to every later request from that app. This system is called TCC (Transparency, Consent, and Control).
Where the settings live
Open System Settings, choose Privacy & Security, and pick a category. Three matter for this tutorial:
| Category | What it controls |
|---|---|
| Contacts | Which apps may read and change your contact cards |
| Calendars | Which apps may read or change events. Recent macOS versions can offer "add only" access for apps that only create events. |
| Automation | Which apps may send commands to other apps, such as Mail or Calendar |
Each category lists apps with a switch. Turn a switch off to revoke access. The app may then ask again the next time it needs the data.
Mail has no list of its own. Reading Mail's stored files directly requires Full Disk Access, a broad permission that covers most of your files. Grant it only to apps you trust, such as a backup tool you chose yourself.
Automation permissions
Scripts use Automation permission. The first time a script talks to an app, macOS asks whether the controlling app may do so. The controlling app is Terminal, Script Editor, or whichever app runs the script. Run this in Script Editor:
tell application "Mail"
get name of every account
end tellmacOS asks whether Script Editor may control Mail. If you click Don't Allow, the script fails with a "Not authorized to send Apple events" error (number -1743). To fix it, open Privacy & Security, then Automation, and switch Mail on under the controlling app.
Resetting decisions
If an app never prompts again, or you want to start fresh, the tccutil command clears stored decisions for one service. Each command below resets every app for that service:
tccutil reset AddressBook
tccutil reset Calendar
tccutil reset AppleEventsAddressBook is the internal name for Contacts, and AppleEvents is Automation. After a reset, apps ask again on their next request.
Common mistakes
- Denying a prompt by reflex, then wondering why an app shows no contacts. Check the switch in Privacy & Security.
- Granting Full Disk Access to fix one small problem. Try the narrower category first.
- Assuming account settings control this. Accounts decide what data exists, while privacy settings decide who may read it.
Exercise
A script that runs in Terminal reports "Not authorized to send Apple events to Calendar." Where do you go to fix it, and which app gets the switch?
Show answer
Go to System Settings, then Privacy & Security, then Automation. Under Terminal, which is the app running the script, switch on Calendar. If Terminal is not listed, run tccutil reset AppleEvents and run the script again to trigger a new prompt.