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 6 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
57 changes: 57 additions & 0 deletions source/_integrations/onedrive.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
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
---

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.

Backups will be created in a folder called `home-assistant\backups` in the `App Folder` of your OneDrive.
The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your OneDrive.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix grammatical error

Use "an" instead of "a" before "application".

-The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your 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.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The integration only has access to a application specific `home-assistant` folder in the `App Folder` and cannot access any other parts of your 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.
🧰 Tools
🪛 LanguageTool

[misspelling] ~18-~18: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ive. The integration only has access to a application specific home-assistant f...

(EN_A_VS_AN)


{% 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.
Everything is done in a delegated user context, so nobody will ever have access to your data except you. 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