Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for OneDrive #36768

Open
wants to merge 8 commits into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions source/_integrations/onedrive.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: OneDrive
description: Instructions on how to setup OneDrive to be used with backups.
ha_release: 2025.2
ha_category:
- Backup
ha_iot_class: Cloud Polling
ha_config_flow: true
ha_domain: onedrive
ha_codeowners:
- '@zweckj'
ha_integration_type: service
c0ffeeca7 marked this conversation as resolved.
Show resolved Hide resolved
related:
- docs: /common-tasks/general/#backups
title: Backups
---

This integration allows you to use [OneDrive](https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage) for use with [Home Assistant Backups](/common-tasks/general/#backups).

Backups will be created in a folder called `home-assistant\backups_<id>` in the `App Folder` of your OneDrive.
`id` is part of your Home Assistant instance's unique id to allow backups from multiple instances to the same OneDrive.
The integration only has access to an application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.

{% include integrations/config_flow.md %}
{% configuration_basic %}
Client ID:
description: "Application Id of the app registration to be used with the integration. Uses Home Assistant provided by default."
Client secret:
description: "Application secret for the app registration. Uses Home Assistant provided by default."

{% endconfiguration_basic %}

{% include integrations/option_flow.md %}

## Requested permissions by the integration

The integration will request the following permissions on your OneDrive for the integration to work:

- `Files.ReadWrite.AppFolder`: Grants the application permission to read and write in its own, app-specific folder inside your OneDrive
- `offline_access`: Grants the application permission to refresh its authentication token without requiring your manual intervention
- `openid`: Grants the application permission to read basic information, e.g. if you have a OneDrive

## Getting application credentials

This integration comes with a predefined set of [application credentials](https://www.home-assistant.io/integrations/application_credentials/) through Home Assistant account linking.
Nobody will ever have access to your data except you, as the app does not have permission to do anything on its own. It only works with a signed in user (it only has `delegated` not `application permissions`).
However, if you want to use your own credentials, follow [this guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate) to create your own client ID and secret.

{% note %}
You will need an Azure tenant with an active Azure subscription to create your own client credentials.
{% endnote %}

## Known Limitations

- Only personal OneDrives are supported at the moment

## Removing the integration

This integration follows standard integration removal. No extra steps are required.

{% include integrations/remove_device_service.md %}
Loading