Onedrive for business

i want to use onedrive for business for my backups. there I have more storage then on my personal. can you add these integration?

Not planned from my end, because of mainly three reasons

  • OfB doesn’t have the app folder meaning the integration would need full read/write permissions on the entire OneDrive
  • OfB doesn’t have descriptions, so no place to store metadata
  • I don’t expect a lot of people would want to use OfB with their personal data

That doesn’t mean of course that somebody else won’t add it.

I share the requirement. I think more than some uses have OfB. There is the space for backups.

1 Like

thats true. you have more space on business accounts then on private

Also, while it “onedrive for business” sounds big, it is plenty useful for small independents (soho, zzp). I have a one user subscription. It would really be good if it would work.

I also would need this. Is t that much Work? IS IT that different?

It is very different. Onedrive for business is just a SharePoint mount point.

Maybe combine a few local backups with something like Duplicati that will keep historical versions of files that were in the local directory. It will back up to many cloud locations, including OfB. And will back up much more than HA!

It’s not that much work tbh. The main problem I see is, that (due to how OfB works) you’d always need to give Home Assistant “Write” permissions on your entire drive (not a separate folder like it is for the current onedrive integration), which would probably be a deal breaker for most people…
The other problem is that it would require a separate integration, which is very similar to the onedrive one, but not quite enough, and I’m currently not interested in maintaining two integrations…

I too would like to see this supported. However, I see there’s a docker image for a OneDrive client that supports all flavors of MS accounts. Has anyone tried using this and mounting it as a local folder for HA to backup to? I am going to try this when I have a moment. Will report back.

Just putting a +1 for this.

This would be fantastic! OfB offers up to 25tb storage, and is a perfect repo for backups.

Somebody attempted to make a port a while back (GitHub - ghostinator/hass-onedrive-m365: A Home Assistant integration for Microsoft OneDrive for Business (M365). Connect and automate with your work/school cloud storage), but that repo doesn’t appear to be maintained.

@zweckj - You may have already seen this, but MS added a way to limit access to a specific folder in OfB without requiring access to the entire OneDrive - What is an App Folder - OneDrive API - OneDrive dev center | Microsoft Learn. Basically the data will be stored in the “App” folder of the user’s OneDrive.

It’s a bit more involved, but it would be great if OfB support could be added!

Yes and the current integration uses that, but that’s exactly my point - this is not a thing for OfB, only for personal (at least the Files.ReadWrite.AppFolder permission that would limit the access to this folder)

+1 for OneDrive for Business

I’ve started work on this Add integration for onedrive for business by zweckj · Pull Request #155709 · home-assistant/core · GitHub

2 Likes

Just curious, but is it documented somewhere that OfB doesn’t support app folders? Or maybe MS has removed that limitation recently?

All the MS documentation I can find on the app folders doesn’t indicate that it’s only for personal OneDrive accounts, they just talk about OneDrive and SharePoint. One of the pages even lists a OfB URL with tenant ID in the example JSON: Using app folder in OneDrive and SharePoint - Microsoft Graph | Microsoft Learn

I’d be interested in an OfB integration regardless, but if it does use the more limited app folder access that would be preferable for sure.

Appfolders per se are supported, the scoped permissions AppFolder.ReadWrite.All are not. It’s somewhere in the documentation

Looking at the available permissions to assign via app registrations (correct me if I need to be looking in a different place or if this isn’t the right thing) but it does give the option for Files.ReadWrite.AppFolder as an option. Is that not what you’re needing for this?

And I’m happy to help test/troubleshoot if you need someone with a 365 Business subscription to see if things work the same way.

Edit: it’s also listed under delegated permissions but has (preview) added to the description.

No.

If you need another tester, I’m available :wink:
Also as the integration ghostinator/hass-onedrive-m365: A Home Assistant integration for Microsoft OneDrive for Business (M365). Connect and automate with your work/school cloud storage isn’t really working at the moment :frowning: i connects fine, but once HA restarts, the connection is lost