keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

Add support for OneDrive for Business

Open carpac opened this issue 9 years ago • 48 comments

When I try to open a database that is stored on OneDrive for Business, I always get a "password is wrong" error (although I am pretty sure that I typed in the correct password). Does Keepass2Android work with OneDrive for Business, too, or only with OneDrive (the "consumer" version)?

carpac avatar Oct 17 '17 14:10 carpac

OneDrive for Business is currently not supported. As far as I understand I need a MS subscription account just for including this feature.

PhilippC avatar Oct 20 '17 04:10 PhilippC

I don't know if you need a MS subscription account. On my Windows pc I am using KeePass with the plugin "KeePass OneDrive Sync" (see https://github.com/KoenZomers/KeePassOneDriveSync). Maybe you could ask the author of this plugin, Koen Zomers, what is needed to support OneDrive for Business.

carpac avatar Oct 25 '17 13:10 carpac

I am also very interested in this. As carpac commented it is working with that plugin. I guess it is because its developer has the needed MS developer account.

I would be interested in sponsoring an account for the developer of this app. Which account would be needed (individual/company) and how much would it be (region dependent, see link below)? Is that an option?

https://docs.microsoft.com/sv-se/windows/uwp/publish/account-types-locations-and-fees

kribjo avatar Mar 02 '18 10:03 kribjo

Here is some further information, seems the client secret can be created without expiration. https://github.com/KoenZomers/KeePassOneDriveSync/issues/51

kribjo avatar Mar 02 '18 11:03 kribjo

please use the thumbs-up reaction on the issue itself. I occasionally sort issues for this reaction when I try to decide which features will be included for the next release.

PhilippC avatar Aug 13 '18 19:08 PhilippC

Not sure what was in the deleted comments, but I was wondering if there is anything in addition to using the thumbs-up to help make this feature happen?

CartCaved avatar Nov 18 '18 13:11 CartCaved

I'm also interested in this feature.

It looks like OneDrive for business needs a different authentication mechanism: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/aad-oauth?view=odsp-graph-online

And the developer needs an Office 365 subscription: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration-server?view=odsp-graph-online

A developer subscription would cost 99$ per year :cry:

pstorch avatar Dec 08 '18 13:12 pstorch

I would be willing to donate the sub fee for this feature. I'm sure there might be a few who would also chip in for a developer o365 sub.

cursix avatar Dec 09 '18 22:12 cursix

I have purchased a Developer subscription and re-implemented OneDrive access using the new MS Graph SDK. It seems to be working for personal accounts but I can't access my OneDrive for business account, so for now that's no improvement... @kribjo I am not sure if something is wrong with my account so if you have the possibility to create another account for me for testing just for a month, I'd be really grateful. Any subscription which comes with OneDrive for business access would be fine.

PhilippC avatar Dec 29 '18 16:12 PhilippC

@kribjo please ignore my request, I think the error is more related to my app configuration than to the account.

PhilippC avatar Dec 30 '18 06:12 PhilippC

Hi Philipp, Just installed your app, also try to connect to the .kdbx on my Onedrive for Business. Do you think you will be able to add the above mentioned support for it? Would be great! Regards, Michiel

michielhageman avatar Jan 08 '19 07:01 michielhageman

@michielhageman as you may read in the posts above yours - I am trying to do so but wasn't successful so far yet.

PhilippC avatar Jan 13 '19 19:01 PhilippC

@philippC thanks for your effort. This feature would be great. Currently rolled out KeePass in our company, so O4B support would be much appreciated. If you need anything let me know.

MarkJenniskens avatar Jan 14 '19 07:01 MarkJenniskens

It seems to be working for personal accounts but I can't access my OneDrive for business account, so for now that's no improvement...

@PhilippC So this is either an issue in your app registration (in the Microsoft App Registration Portal) or you're not using the ADALv2 authentication endpoint. I would assume it's the latter, as you're still using MS-ADAL 1.14. Have you tried the "MSA Auth For Android Adapter" with the Graph SDK already?

mplogas avatar Feb 12 '19 10:02 mplogas

@mplogas thanks a lot for taking a look! I am close to giving up on this, but it would be awesome if we could solve this issue and I really appreciate any help. I am not exactly sure if I understand what you mean. Please note that I currently have two OneDrive implementations in the repo (my plan was to keep the old implementation so users which are currently using OneDrive can continue and don't have to re-login or anything, but use the new implementation for new connections). The new implementation can be found on https://github.com/PhilippC/keepass2android/blob/master/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/OneDriveStorage2.java. It uses the PublicClientApplication class and I don't think this is still using the ADAL 1.14, right? I rather have the feeling that it might be an issue with my app registration, I don't even know if the Office 365 Enterprise E3 Developer subscription which I have purchased for this is what I need (I received a "free credit has expired" mail from Microsoft some days after setting everyithng up). If you think my implementation is ok, what should I provide so you can take a look at the app registration? Again, thanks a lot for any help!

PhilippC avatar Feb 17 '19 07:02 PhilippC

I have a slightly different experience. Not "password is wrong" but when I try to open OneDrive for Business with an account name of [email protected], I get "that Microsoft account does not exist" even though I can open this account on OneDrive for Android. This onmicrosoft.com domain is used when you don't want to associate your own domain with the OneDrive account.

mhors avatar May 25 '19 06:05 mhors

I also need this feature, as I am moving all my data from "OneDrive Personal" to "OneDrive for Business". As in the previous post: When I enter the UserID of my "OneDrive for Business" account I get the error "Account does not exist" in KeePass4Android (Apparently it only finds OneDrive Personal accounts). A short search brought me here to this topic to find out OneDrive for Business is not supported yet. Let me know if there is anything I can help with.

J-O-P avatar May 26 '19 08:05 J-O-P

Hello Philipc, how can i help you ? i have ent account on OneDrive for business. Thank you. I test OneDrive with a pesonnal account : work great ! But i want now to deploy over 3000 users… :-)

Edouard37 avatar Jun 26 '19 11:06 Edouard37

Hi @PhilippC If you need an enterprise account with OneDrive and some other licenses I can provide you with a few for free. Thanks for all the work ;)

karol-gro avatar Jun 27 '19 14:06 karol-gro

+1, regarding the: "OneDrive for Business" account I get the error "Account does not exist" in KeePass4Android.

ethzero avatar Jul 29 '19 22:07 ethzero