# macOS: avfoundation: Could not start capture / "Terminal" does not have access to the camera or microphone — tccd denied

**Code:** `Camera/Microphone access denied (TCC)` · **Category:** macOS · **Seen on:** macOS

Privacy (TCC) blocks the app or terminal from the camera or microphone until you allow it.

## Meaning

Go to System Settings → Privacy & Security → Camera/Microphone and enable the app that runs the code (Terminal, iTerm, VS Code, a browser). If no prompt appears the entry may have been denied earlier: reset with `tccutil reset Camera` or `tccutil reset Microphone`, then rerun. Hardened apps need `NSCameraUsageDescription` in Info.plist.

## Common causes

- Permission previously denied
- Script runs under a terminal that lacks the permission
- Missing usage description in Info.plist (developer)
- App re-signed so permission lost
- Corporate MDM policy

## Quick fix

1. Enable the app in Camera/Microphone settings
2. `tccutil reset Camera` / `Microphone`, then relaunch
3. Developers: add `NSCameraUsageDescription` / `NSMicrophoneUsageDescription`

## Detailed fix by platform

### macOS

1. `tccutil reset Camera && tccutil reset Microphone`

## How to diagnose

1. **Host** — Terminal/IDE/app?
2. **Toggle** — Enabled?
3. **plist** — Usage string?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/macos/tcc-camera-microphone-denied)
