# Deploy Aikido Device Protection with Intune

Use Microsoft Intune to deploy Aikido Device Protection across your managed macOS fleet with the required permissions in place.

## Installation

{% stepper %}
{% step %}
**Get your Aikido Device Protection token and package**

Open [Aikido Device Protection](https://app.aikido.dev/endpoint-protection/devices) and click **Connect Device**.

Download the Aikido Endpoint `.pkg` and copy your device protection token.
{% endstep %}

{% step %}
**Add the Aikido Device Protection configuration profile**

1. [Download the Aikido `.mobileconfig` file](https://raw.githubusercontent.com/AikidoSec/safechain-internals/refs/heads/main/docs/aikido-endpoint.mobileconfig).
2. In the Intune admin center, go to **Devices** → **macOS** → **Configuration** → **Create** → **New Policy**.
3. Select **macOS** as the platform. Under **Profile type**, select **Templates**, then choose **Custom**.
4. Give the profile a name (e.g. "Aikido Device Protection").
5. Under **Custom configuration profile name**, enter a name and browse to the downloaded `.mobileconfig` file to upload it.
6. Assign the profile to the target device group.

This profile allows the Aikido Device Protection system extension to load silently, enables the network content filter, and stops users from disabling background services in System Settings → Login Items.
{% endstep %}

{% step %}
**Upload the Aikido Device Protection installer**

1. In the Intune admin center, go to **Apps** → **macOS** → **Add**.
2. Select **macOS app (PKG)** as the app type.
3. Upload the Aikido Device Protection `.pkg` file.
4. On the **Program** tab, add a **Pre-install script** with the content below. Replace `AIK_SAFE_CHAIN_TOKEN` with your real token.

```bash
#!/bin/zsh
echo "AIK_SAFE_CHAIN_TOKEN" > /tmp/aikido_endpoint_token.txt
```

5. Complete the remaining tabs (**Detection rules**, **Assignments**) and assign the app as **Required** for the same device group.

{% hint style="info" %}
Pre-install scripts require the Intune management agent version **2309.007** or later. The script must exit with code `0` for the installation to proceed.
{% endhint %}
{% endstep %}

{% step %}
**Deploy in the right order**

{% hint style="warning" %}
Order matters. The configuration profile must reach the device before or at the same time as the pkg. If the pkg installs first, macOS can ask the user for extra permissions.
{% endhint %}

Intune deploys configuration profiles and apps independently, so make sure the profile is assigned and synced before the app reaches devices:

1. Assign and sync the **Aikido Device Protection** configuration profile.
2. Then assign the **Aikido Device Protection** app.

If you're deploying everything at once, the configuration profile typically arrives before apps. To be safe, assign the profile first and confirm it appears on a test device before assigning the app.
{% endstep %}

{% step %}
**Verify the deployment**

On a test device, confirm:

1. The system extension is activated:

   ```bash
   systemextensionsctl list | grep aikido
   ```

   Expect to see the extension marked `[activated enabled]`.
2. Open **System Settings** → **General** → **Login Items & Extensions** and confirm the Aikido Device Protection entries cannot be toggled off.
   {% endstep %}
   {% endstepper %}

## Troubleshooting

| Problem                                              | Fix                                                                                                  |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Users still see the popup                            | Make sure the configuration profile is scoped correctly and installed before the package policy runs |
| Extension is waiting for user approval               | Check the System Extensions payload and confirm the team ID and bundle ID match exactly              |
| The package installs but the device does not connect | Confirm the token script ran before the package install and that the token was copied correctly      |
| Duplicate extension entries appear                   | Reboot the device                                                                                    |
| The content filter is not approved silently          | Re-upload the `.mobileconfig` profile and verify it is installed on the device                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.aikido.dev/aikido-device-protection/deploying-aikido-endpoint/deploy-aikido-endpoint-with-intune.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
