> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit policy

> Turn on security auditing and choose which security events your Macs and Windows devices record.

The Audit policy control turns on security auditing on your devices and chooses which events they record, such as sign-ins, administrative actions and failed file accesses. It also decides what a device does when it can no longer record the audit.

## Platform compatibility

| macOS | Windows | Linux | iOS / iPadOS | Android |
| - | - | - | - | - |
| ✅ | ✅ | | | |

Requires macOS 15 or later. On Windows, **Audit the use of the backup and restore privileges**, **Subcategories override category settings** and **Shut down when the audit cannot be recorded** need Windows 11 22H2 with KB5053657, 23H2 with KB5053657, or 24H2 and later.

## Set up the control

**1. Add a configuration**

Go to **MDM** > **Controls** and open **Audit policy**. Select the platform tab, then click **Add configuration**.

**2. Configure the settings**

Set each setting you want to enforce. See the settings below. On macOS, select at least one event. On Windows, set at least one setting.

**3. Select targeting**

Choose which devices to apply the configuration to: all devices on that platform, specific device groups, or a custom target. Click **Activate** to deploy the configuration. **Save** keeps it inactive.

## Settings

> [tab] macOS
>
> | Setting | Options |
> | - | - |
> | **Audited events** | **Login and logout**, **Authentication and authorization**, **Administrative actions**, **File attribute changes**, **Failed file attribute changes**, **File attribute deletions**, **Failed file reads**, **Failed file writes**, **Failed program executions** |
> | **When the audit cannot be recorded** | **Shut down the Mac**, **Keep the Mac running**, **Not configured** |
>
> * **Audited events**: the Mac records only these events. Selecting events turns security auditing on.
> * **When the audit cannot be recorded**: shutting down protects the audit trail, but a full disk then stops the Mac. **Not configured** keeps the Mac's own setting.

> [tab] Windows
>
> A setting on **Not configured** isn't written: the device keeps its own setting.
>
> Under **Audit options**, each setting is **On**, **Off** or **Not configured**:
>
> * **Include the command line in process creation events**
> * **Audit the use of the backup and restore privileges**
> * **Subcategories override category settings**
> * **Shut down when the audit cannot be recorded**
>
> A configuration that sets one of the last three is sent only to devices on Windows 11 22H2 or 23H2 with KB5053657, or 24H2 and later.
>
> Then, for each subcategory, choose **Success and failure**, **Success**, **Failure**, **No auditing** or **Not configured**. The subcategories are grouped by category:
>
> | Category | Subcategories |
> | - | - |
> | **Account logon** | **Credential Validation**, **Kerberos Authentication Service**, **Kerberos Service Ticket Operations**, **Other Account Logon Events** |
> | **Logon and logoff** | **Account Lockout**, **Group Membership**, **IPsec Extended Mode**, **IPsec Main Mode**, **IPsec Quick Mode**, **Logoff**, **Logon**, **Network Policy Server**, **Other Logon/Logoff Events**, **Special Logon**, **User / Device Claims** |
> | **Account management** | **Application Group Management**, **Computer Account Management**, **Distribution Group Management**, **Other Account Management Events**, **Security Group Management**, **User Account Management** |
> | **Detailed tracking** | **DPAPI Activity**, **Plug and Play Events**, **Process Creation**, **Process Termination**, **RPC Events**, **Token Right Adjusted Events** |
> | **Object access** | **Application Generated**, **Central Policy Staging**, **Certification Services**, **Detailed File Share**, **File Share**, **File System**, **Filtering Platform Packet Drop**, **Handle Manipulation**, **Kernel Object**, **Other Object Access Events**, **Registry**, **Removable Storage**, **SAM** |
> | **Policy change** | **Audit Policy Change**, **Authentication Policy Change**, **Authorization Policy Change**, **Filtering Platform Policy Change**, **Firewall Rule Policy Change**, **Other Policy Change Events** |
> | **Privilege use** | **Non Sensitive Privilege Use**, **Other Privilege Use Events**, **Sensitive Privilege Use** |
> | **System** | **IPsec Driver**, **Other System Events**, **Security State Change**, **Security System Extension**, **System Integrity** |

## How it works

> [tab] macOS
>
> Primo runs a script on each Mac and checks the result with a policy. The script saves the Mac's own audit configuration, writes the events you selected to `/etc/security/audit_control`, and starts the audit daemon. The settings you don't manage keep Apple's defaults.
>
> If someone edits the audit configuration on the Mac, the policy fails and Primo runs the script again.
>
> When you remove the configuration, Primo puts back the Mac's own audit configuration and the audit daemon's previous state.
>
> > [!NOTE]
> >
> > Apple has deprecated the audit daemon in favor of the Endpoint Security framework, and Macs don't run it by default. The control turns it on.

> [tab] Windows
>
> Primo applies the settings through Windows audit policies for the whole device. Each subcategory you set replaces the device's own setting for that subcategory.
>
> **Subcategories override category settings** set to **On** makes Windows apply the subcategory settings instead of any legacy category-level audit setting.

> [!WARNING]
>
> **Shut down the Mac** stops the Mac when it can't write its audit trail, for
> example when its disk is full. On Windows, **Shut down when the audit cannot
> be recorded** stops the device when the security log is full and can't be
> overwritten, and only an administrator can sign in afterwards.

## Modify or remove the control

Open the control from **MDM > Controls** to edit, deactivate or replace a configuration.

## Related articles

* [Controls overview](https://docs.getprimo.com/mdm/policies/overview.md)
* [Event logging](https://docs.getprimo.com/mdm/policies/event-logging.md)
* [System file permissions](https://docs.getprimo.com/mdm/policies/system-file-permissions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.