Alright, so I tried to use Sharepoint sites as storage, and so far I failed to achieve success. There was a mention of this some time ago on the forums, but it seems that it didn’t go anywhere. So existing OneDrive backend supports personal and business OneDrive, but not Sharepoint? It probably makes sense to support it as Sharepoint seems to be the end game for business OneDrive as far as Microsoft is concerned (OD is seens as personal file storage, anything team/organization is supposed to go Sharepoint). I also don’t think that you can get more than 5TB on OneDrive, and it is not pooled storage unlike GDrive. Sharepoint sites can be provisioned up to 25TB (that’s how they add storage on unlimited enterprise plans).
I thought that the easiest way to add support for that without touching any of the front end stuff would be supporting Sharepoint links within OD4B. This effectively mounts Sharepoint library(ies) somewhere in regular OD4B tree. This works seamlessly from web interface (e.g. it is just another folder). RClone also supports it mostly seamlessly (it doesn’t show SP links in ls commands, but if you use explicit path it can list and use all the files in the mounted SP library straight from OD backend).
I believe this will need some work to support SP links in OD storage as API is different, but all of this can be done on the OD backend. Don’t think it would be necessary to touch any of the OD authorization/token stuff, perhaps add some permissions specific to Sharepoint.
P.S. I probably can do it running webdav backend over rclone serve, but… you know