Skip to main content
Print

Back Up Home Assistant to OneDrive for Business

A backup is only useful if it survives the thing you are backing up. Home Assistant can back up to OneDrive for Business, giving Microsoft 365 users another off-site destination without buying additional storage elsewhere.

What you need

You need a OneDrive for Business account, access to Microsoft Entra app registrations and a current Home Assistant release that supports the integration.

1. Create a destination folder

Create a folder in OneDrive for the Home Assistant backups. Keeping each Home Assistant instance in its own folder makes restores and retention much easier to understand.

2. Register an application in Microsoft Entra

Create a new app registration for Home Assistant and configure the redirect URI required by the integration. Record the application/client ID and tenant/directory ID.

3. Add the required Microsoft Graph permissions

Grant only the delegated permissions required by the integration, including the relevant file access and offline access permissions. Review Microsoft’s current permission descriptions rather than blindly granting wider access.

4. Create a client secret

Create a secret and securely record its value when it is displayed. Microsoft does not show that secret value indefinitely. Also record its expiry date so the backup does not mysteriously stop working in two years’ time.

5. Add OneDrive for Business to Home Assistant

Go to Settings → Devices & services → Add integration, select Microsoft OneDrive for Business and enter the tenant, application ID and secret requested by Home Assistant. Complete the Microsoft sign-in and select your backup folder.

6. Add it to automatic backups

Go to Settings → System → Backups → Backup settings and enable OneDrive for Business as a backup location.

7. Test it

Create a manual test backup and verify that the file actually appears in OneDrive. Do not assume a backup destination works simply because the configuration screen accepted it.

Watch the walkthrough

Table of Contents