# macOS: execution error: Not authorized to send Apple events to System Events. (-1743)

**Code:** `Not authorized to send Apple events to x (-1743)` · **Category:** macOS · **Seen on:** macOS

The app running the script isn't allowed to control another application via Automation permissions.

## Meaning

Open System Settings → Privacy & Security → Automation, expand the host app and enable the target app (System Events, Finder, Safari). If no prompt appears, reset: `tccutil reset AppleEvents`. Sandboxed/hardened apps need the `com.apple.security.automation.apple-events` entitlement.

## Common causes

- Automation permission not granted
- Previously denied prompt
- Host app re-signed
- Missing entitlement for hardened builds
- Running as a LaunchDaemon without GUI session

## Quick fix

1. Grant in Automation settings
2. `tccutil reset AppleEvents` and rerun to get the prompt again
3. Add the Apple Events entitlement and `NSAppleEventsUsageDescription`

## Detailed fix by platform

### macOS

1. `tccutil reset AppleEvents` then run the script from the app that needs permission

## How to diagnose

1. **Target** — Which app?
2. **Prompt** — Shown?
3. **Entitlement** — Present?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/macos/osascript-apple-events-not-authorized-1743)
