{"id":10934,"date":"2026-03-06T19:57:23","date_gmt":"2026-03-06T17:57:23","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=10934"},"modified":"2026-03-06T21:58:10","modified_gmt":"2026-03-06T19:58:10","slug":"je-sauvegarde-home-assistant-sur-mon-onedrive-business","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business","title":{"rendered":"I save Home Assistant on my Onedrive Business"},"content":{"rendered":"<p>I wanted to use OneDrive for Business as a backup destination in Home Assistant.<\/p>\n<p><a href=\"https:\/\/www.home-assistant.io\/integrations\/onedrive_for_business\" target=\"_blank\" rel=\"noopener\">Official integration<\/a> allows backups to be sent to OneDrive for Business, but asks to prepare an application in Microsoft Entra beforehand, with a Tenant ID, a Client ID, a Secret Client and a precise redirect URI.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6ae5f9f36dc2b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae5f9f36dc2b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Prerequis\" >Prerequisite<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_point_de_depart_dans_Home_Assistant\" >The starting point in Home Assistant<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_detour_par_Microsoft_Entra\" >The detour by Microsoft Entra<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#La_recuperation_des_identifiants\" >The recovery of identifiers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#La_creation_du_secret_client\" >The creation of customer secrecy<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Les_permissions_necessaires\" >The necessary permissions<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_retour_dans_Home_Assistant\" >Return to Home Assistant<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Les_champs_a_remplir\" >The fields to be filled in<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_cas_particulier_de_lapprobation_administrateur\" >The special case of administrator approval<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_choix_du_compte_reellement_utilise\" >The choice of the account actually used<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_dossier_de_destination_pour_les_sauvegardes\" >The destination folder for backups<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_resultat_dans_Home_Assistant\" >The result in Home Assistant<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Je_vais_verifier_si_le_dossier_a_bien_ete_cree_dans_OneDrive_facultatif\" >I will check if the folder was created in OneDrive (optional)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Je_configure_les_sauvegardes_Home_Assistant_vers_OneDrive_for_Business\" >I configure Home Assistant backups to OneDrive for Business<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_parametrage_des_sauvegardes\" >Setting up backups<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Les_options_de_retention\" >Retention options<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Le_premier_test_de_sauvegarde\" >The first backup test<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Verification_dans_OneDrive\" >Verification in OneDrive<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Configurer_les_sauvegardes_automatiques\" >Configure automatic backups<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Surveillance_des_sauvegardes\" >Supervision of backups<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/je-sauvegarde-home-assistant-sur-mon-onedrive-business\/#Les_bonnes_pratiques\" >Good practices<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequis\"><\/span>Prerequisite<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before you start, you need to:<\/p>\n<ul>\n<li>A functional Home Assistant.<\/li>\n<li>A Microsoft 365 \/ OneDrive for Business account.<\/li>\n<li>Access to the Microsoft Entra portal with an account that can create an application. Microsoft indicates that at least one Application Developer role is required.<\/li>\n<li>Knowing the redirect URL used by Home Assistant will be: https:\/\/my.home-assistant.io\/redirect\/oauth.<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Le_point_de_depart_dans_Home_Assistant\"><\/span>The starting point in Home Assistant<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>I started directly in Home Assistant, in <strong>Settings &gt; Devices and Services<\/strong>, then I added integration <strong>OneDrive for Business<\/strong>. The first window asked me for the identifier of the Entra tenant in which the account to be used with the integration was located.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10937\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457.png\" alt=\"\" width=\"593\" height=\"387\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457.png 593w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457-300x196.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/p>\n<p>At that time, I did not yet have the necessary identifiers. So I left Home Assistant aside to go and prepare the application on the Microsoft Entra side. [page:116]<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Le_detour_par_Microsoft_Entra\"><\/span>The detour by Microsoft Entra<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-10979 size-medium\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/entra-300x80.jpg\" alt=\"\" width=\"300\" height=\"80\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/entra-300x80.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/entra-768x206.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/entra-600x161.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/entra.jpg 820w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>I'm going to: <a href=\"https:\/\/entra.microsoft.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/entra.microsoft.com\/<\/a><\/p>\n<p>and I log in with an administrator account or otherwise an Application Developer profile.<\/p>\n<p>When I arrived at Microsoft Entra, I first thought that I had to go through the <strong>Enterprise applications<\/strong>. In fact, this was not the right place for this type of configuration.<\/p>\n<p>To create the credentials expected by Home Assistant, you had to go to <strong>Entra ID &gt; Application registrations<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10964\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175537.png\" alt=\"\" width=\"277\" height=\"317\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175537.png 277w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175537-262x300.png 262w\" sizes=\"auto, (max-width: 277px) 100vw, 277px\" \/><\/p>\n<p>This is where I opened the screen to create a new registration.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10963\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175625.png\" alt=\"\" width=\"795\" height=\"432\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175625.png 795w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175625-300x163.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175625-768x417.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175625-600x326.png 600w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/p>\n<p>Microsoft explains, moreover, that an application must be registered in order to obtain the credentials necessary for authentication.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10967\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175817-1.png\" alt=\"\" width=\"581\" height=\"599\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175817-1.png 581w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-175817-1-291x300.png 291w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n<ul>\n<li>The name is free, I put <strong>Home Assistant OneDrive Backups<\/strong><\/li>\n<li>The account type is <strong>Single tenant only<\/strong><\/li>\n<li>the redirect URL is<strong> Web https:\/\/my.home-assistant.io\/redirect\/oauth<\/strong><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"La_recuperation_des_identifiants\"><\/span>The recovery of identifiers<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once the registration was done, I arrived at the overview page. I found the two most important information for the future: l\u2019<strong>Directory ID (tenant)<\/strong>, which corresponds to <strong>Tenant ID<\/strong>, and<strong>Application ID (customer)<\/strong>, which corresponds to <strong>Client ID<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10960\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180011.png\" alt=\"\" width=\"216\" height=\"179\" \/><\/p>\n<p>I immediately noted these two values, as Home Assistant requests them during the installation wizard.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"La_creation_du_secret_client\"><\/span>The creation of customer secrecy<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The last missing data was the application secret. In the app menu, I opened <strong>Certificates &amp; secrets<\/strong>, and then I created a <strong>New Customer Secret<\/strong>. Microsoft allows you to add a description and choose a period of validity.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10968\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180851-1.png\" alt=\"\" width=\"832\" height=\"551\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180851-1.png 832w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180851-1-300x199.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180851-1-768x509.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180851-1-600x397.png 600w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10955\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180922.png\" alt=\"\" width=\"586\" height=\"157\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180922.png 586w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-180922-300x80.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/p>\n<p>Once the secret was generated, I copied its <strong>value<\/strong> immediately. This step is important because it is this value that needs to be pasted into Home Assistant, not the secret identifier.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10982\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181015.png\" alt=\"\" width=\"1014\" height=\"215\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181015.png 1014w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181015-300x64.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181015-768x163.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181015-600x127.png 600w\" sizes=\"auto, (max-width: 1014px) 100vw, 1014px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Les_permissions_necessaires\"><\/span>The necessary permissions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before leaving Entra, permission must be given for the entry that has just been added.<\/p>\n<p>The following permissions are required:<\/p>\n<ul>\n<li><code>Files.ReadWrite.All<\/code> : allows the application to read and write in any folder of OneDrive. Unlike personal OneDrive, OneDrive for Business does not support permissions <code>Files.ReadWrite.AppFolder<\/code>, so these are the minimum possible permissions.<\/li>\n<li><code>offline_access<\/code> : allows the application to automatically renew its authentication token without manual intervention.<\/li>\n<li><code>openid<\/code> : allows the app to read the basic information, for example if I had a OneDrive.<\/li>\n<\/ul>\n<p>So I'm going into <strong>APIs allowed<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10970\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183400-1.png\" alt=\"\" width=\"261\" height=\"207\" \/><\/p>\n<p>At the moment there is nothing but Microsoft Graph User.read.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10971\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1.png\" alt=\"\" width=\"1030\" height=\"343\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1.png 1030w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1-300x100.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1-1024x341.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1-768x256.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-183934-1-600x200.png 600w\" sizes=\"auto, (max-width: 1030px) 100vw, 1030px\" \/><\/p>\n<p>I'm going on <strong>Add Authorization<\/strong><\/p>\n<p>In the window that opens, I keep <strong>Delegated authorisations<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10944\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-184139.png\" alt=\"\" width=\"584\" height=\"345\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-184139.png 584w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-184139-300x177.png 300w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<p>and below, I will fetch the 3 permissions in the search engine to check them one by one:<\/p>\n<ul>\n<li><code>Files.ReadWrite.All<\/code><\/li>\n<li><code>offline_access<\/code><\/li>\n<li><code>openid<\/code><\/li>\n<\/ul>\n<p>I'm validating.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10975\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decan-2026-03-06-185206.png\" alt=\"\" width=\"1024\" height=\"266\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decan-2026-03-06-185206.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decan-2026-03-06-185206-300x78.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decan-2026-03-06-185206-768x200.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decan-2026-03-06-185206-600x156.png 600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>It lacks administrator consent, I rely on <strong>Grant administrator consent<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10976\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230.png\" alt=\"\" width=\"1035\" height=\"252\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230.png 1035w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230-300x73.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230-1024x249.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230-768x187.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-185230-600x146.png 600w\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" \/><\/p>\n<p>This is complete for the configuration on the Microsoft admin panel.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Le_retour_dans_Home_Assistant\"><\/span>Return to Home Assistant<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Back in Home Assistant, I took over the OneDrive for Business setup wizard. I first referred the matter to the <strong>Tenant ID<\/strong>, i.e. the ID of the renter directory retrieved in Entra.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10937\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457.png\" alt=\"\" width=\"593\" height=\"387\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457.png 593w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-174457-300x196.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/p>\n<p>Then Home Assistant asked me for the OAuth credentials of the app.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10969\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181050.png\" alt=\"\" width=\"600\" height=\"563\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181050.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181050-300x282.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Les_champs_a_remplir\"><\/span>The fields to be filled in<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In the Add Application IDs window, I entered a free name to easily identify this connection (e.g. Onedrive) and then pasted the<strong>OAuth Client ID<\/strong> corresponding to the application ID (customer), as well as the <strong>OAuth Customer Secret<\/strong> corresponding to the value of the secret created in Entra.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10952\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181103.png\" alt=\"\" width=\"588\" height=\"294\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181103.png 588w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181103-300x150.png 300w\" sizes=\"auto, (max-width: 588px) 100vw, 588px\" \/><\/p>\n<p>Once these fields were validated, Home Assistant launched the Microsoft Authentication Wizard.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Le_cas_particulier_de_lapprobation_administrateur\"><\/span>The special case of administrator approval<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10977\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-182437.png\" alt=\"\" width=\"456\" height=\"543\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-182437.png 456w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decrn-2026-03-06-182437-252x300.png 252w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/p>\n<p>At one point, I came across this window because I had misconfigured the API permissions. By repeating what explained above, everything worked.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Le_choix_du_compte_reellement_utilise\"><\/span>The choice of the account actually used<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I also noticed an important point during the configuration: the account actually linked to the integration is the one that completes the OAuth authentication.<\/p>\n<p>Creating the application with an admin account does not necessarily mean that OneDrive from the admin account will be used, provided that the relevant consent is correctly granted and final authentication is done with the correct user account.<\/p>\n<p>I strongly advise against using the administrator account for anything other than configuration, Home Assistant must be linked to a user account.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Le_dossier_de_destination_pour_les_sauvegardes\"><\/span>The destination folder for backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10949\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181706.png\" alt=\"\" width=\"589\" height=\"319\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181706.png 589w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-181706-300x162.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/p>\n<p>Once the authentication was complete, Home Assistant asked me the path of the folder where the backups would be stored. The documentation specifies that if this folder does not exist, it will be created at the root of the selected OneDrive.<\/p>\n<p>I was able to choose a simple path like <code>Backups<\/code>, <code>HomeAssistant<\/code> or a tree like <code>HomeAssistant\/Backups<\/code>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Le_resultat_dans_Home_Assistant\"><\/span>The result in Home Assistant<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>After validation, the OneDrive for Business integration was successfully added to Home Assistant.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10938\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-185437.png\" alt=\"\" width=\"663\" height=\"327\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-185437.png 663w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-185437-300x148.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-185437-600x296.png 600w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<p>I was able to see his integration sheet and the sensors exposed, including the space used, the space remaining and the state of the drive.<\/p>\n<p>Moreover, the documentation indicates that the integration provides storage sensors and a state of the drive such as <code>Normal<\/code>, <code>Nearing limit<\/code>, <code>Critical<\/code> or <code>Exceeded<\/code>.<\/p>\n<p>At this point, the installation of the integration was complete and OneDrive for Business was ready to be used as a backup location for Home Assistant.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Je_vais_verifier_si_le_dossier_a_bien_ete_cree_dans_OneDrive_facultatif\"><\/span>I will check if the folder was created in OneDrive (optional)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Out of curiosity, I connect to my OneDrive and I see that the folder <strong>Homeassistant<\/strong> is present, empty for now, but present is perfect.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10988\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202037.png\" alt=\"\" width=\"636\" height=\"426\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202037.png 636w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202037-300x201.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202037-600x402.png 600w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Je_configure_les_sauvegardes_Home_Assistant_vers_OneDrive_for_Business\"><\/span>I configure Home Assistant backups to OneDrive for Business<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The OneDrive for Business integration was now installed and functional in Home Assistant. All that remained was to use it to send backups to my OneDrive for Business.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Le_parametrage_des_sauvegardes\"><\/span>Setting up backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I opened the backups page in <strong>Settings &gt; System &gt; Backups<\/strong>.<\/p>\n<p>I then go into the frame <strong>Backup settings<\/strong> then <strong>Save to x remote locations<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10987\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-201743.png\" alt=\"\" width=\"705\" height=\"491\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-201743.png 705w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-201743-300x209.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-201743-600x418.png 600w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>In the list of available locations, OneDrive for Business now appeared. I activated the switch corresponding to this integration to make it an active destination for automatic backups.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Les_options_de_retention\"><\/span>Retention options<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I have configured the number of backups to keep on OneDrive in the \u2699\/2008\/parameters. I have chosen to keep 10 backups per type, but this value is free depending on the storage needs and the frequency of backups.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10989\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202556.png\" alt=\"\" width=\"700\" height=\"344\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202556.png 700w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202556-300x147.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202556-600x295.png 600w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>I also left the encryption option enabled because the backups contain sensitive data from the Home Assistant installation.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Le_premier_test_de_sauvegarde\"><\/span>The first backup test<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To make sure everything worked, I created a manual backup. On the backups page, I clicked on <strong>+ Save Now<\/strong>, I took automatic to simplify the task.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10990\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-202652.png\" alt=\"\" width=\"284\" height=\"60\" \/><\/p>\n<p>I validated the creation.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Verification_dans_OneDrive\"><\/span>Verification in OneDrive<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A few minutes later, I opened OneDrive for Business in a browser. In the folder I configured when installing the integration (e.g. <code>HomeAssistant<\/code>), the new backup was present.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10991\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-203313.png\" alt=\"\" width=\"810\" height=\"188\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-203313.png 810w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-203313-300x70.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-203313-768x178.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2026\/03\/Capture-decran-2026-03-06-203313-600x139.png 600w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Configurer_les_sauvegardes_automatiques\"><\/span>Configure automatic backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To automate backups, I activated the option <strong>Automatic backups<\/strong> in the settings. I chose a weekly frequency, with a full backup every Sunday and partial backups on weekdays.<\/p>\n<p>With OneDrive for Business enabled as a destination, all these backups automatically moved to the cloud without manual intervention.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Surveillance_des_sauvegardes\"><\/span>Supervision of backups<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Thanks to the sensors provided by the integration, I added a diagnostic card to my main dashboard. This map displays the space used on OneDrive, the remaining space, and the storage status (Normal, Nearing limit, Critical, Exceeded).<\/p>\n<p>This allows me to easily monitor if there is a risk of missing the OneDrive space.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Les_bonnes_pratiques\"><\/span>Good practices<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Since the installation, backups are done without any problems. I kept a local backup as an extra precaution, but OneDrive for Business is now my main destination to avoid data loss in case of hardware issues on the Home Assistant server.<\/p>\n<p>I recommend testing a backup regularly and checking its recovery to make sure everything is working properly.<\/p>","protected":false},"excerpt":{"rendered":"<p>I wanted to use OneDrive for Business as a backup destination in Home Assistant. The official integration does allow backups to be sent to OneDrive for Business, but it requires you to prepare an application in Microsoft Entra beforehand, with a Tenant ID, a Client ID, a Secret Client and a precise redirect URI. Prerequisites Before you start, [\u2026]<\/p>","protected":false},"author":1,"featured_media":10993,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,24],"tags":[],"class_list":["post-10934","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-microsoft-365"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/10934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=10934"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/10934\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/10993"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=10934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=10934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=10934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}