diff --git a/source/_integrations/onedrive.markdown b/source/_integrations/onedrive.markdown new file mode 100644 index 000000000000..182f82fb5866 --- /dev/null +++ b/source/_integrations/onedrive.markdown @@ -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 +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_` 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 %}