## Storage monitoring OneDrive integration

The Glasswall Halo Storage Monitoring service integrates seamlessly with OneDrive user drives, automatically sanitizing [supported file types](/halo/glasswall-halo-supported-file-types) as they are uploaded to monitored drives.

---

## Prerequisites

Before configuring OneDrive monitoring, ensure the following:

- The **Storage monitoring service** is deployed and running.
- An **application is registered** in Microsoft Entra ID with the appropriate permissions.
- The application’s **Client ID**, **Tenant ID**, and **Client Secret** are stored in Azure key vault.
- You have access to the **Halo Storage Monitoring API**

For guidance, refer to the [Halo Storage Monitoring Setup Guide](/halo/storage-monitoring-setup).

---

## Monitoring a user's drive

To set up monitoring, you’ll need:

- **User ID** of the OneDrive owner

You can retrieve the user ID using an endpoint provided by the Halo Storage Monitoring API. see the [Storage Monitoring API documentation](https://api.docs.glasswall.com/storage-monitoring-V1) for details.

### Optional configuration

You can optionally customize each monitor with:

- A **custom policy**

If no custom settings are applied, the default policy is used.

Monitors can be updated or removed at any time to change policies.

**Note:** policies linked to active monitors are locked and cannot be deleted. To remove a policy, first reassign or delete any associated monitors.

---

## How monitoring works

Once activated, the monitor automatically performs the following for each supported file uploaded to the monitored drive:

1. Checks out the file
2. Downloads the file
3. Applies sanitization
4. Re-uploads the cleaned file
5. Checks the file back in

If Halo cannot process an uploaded file, the original file remains unchanged.

**Note:** OneDrive retains version history for all files, allowing users to view, download, or restore earlier versions — including the original, pre-sanitized file.