keepassxc-mail icon indicating copy to clipboard operation
keepassxc-mail copied to clipboard

M365 - Shared Mailbox

Open dico-hubnc opened this issue 1 year ago • 6 comments

Hello,

I'm trying to automate login into shared mailbox from Microsoft 365. I was to able to find any information on how to do it.

Description

Suppose the main user account in M365 : [email protected], and the shared account : [email protected]. I add an entry in KeepassXC with : login = [email protected] and for shared account, there is no valid password but we have to use 'login with another account' from Microsoft login page. I try to use login = [email protected]\shared but Thunderbird/KeePassXC-mail does not recognize this entry in KeepassXC. So, no way to automate the login process with M365 shared account.

Expected Behaviour

Auto login to my shared account transparently.

Current Behaviour

I have to fullfill the microsoft login every time by selecting 'login with another account' by hand.

Possible Solution

Add a special entry in KeepassXC (properties or somethingelse) in order to associate main account with an entry. For example : login = [email protected], login_as = [email protected], password = (password of the login_as account). Leave login_as empty for main account.

Context

Add a shared M365 account in Thunderbird and wants to automate the login process by using KeepassXC entries.

Your Environment

Thunderbird 115.12.2 KeePassXC-mail 1.7 KeePassXC 2.7.9 Windows 10 Pro - 22H2

Thanks, DicoHub

dico-hubnc avatar Jul 03 '24 03:07 dico-hubnc

Do you have "Save new credentials" enabled?

Please provide screenshots of the login screens you have to use and the output of the console (Ctrl+Shift+J and select "multi process"). When I have this information I might be able to determine if this can be done.

kkapsner avatar Jul 03 '24 14:07 kkapsner

Hello,

Many thanks for your quick response. Here you can see that 'save new credentials' is enabled : image After that I open output console and I saw that password is not stored : image So, I just come back to keepassxc-mail settings : untick 'save new credentials' and tick again; and after that messages changed : image Finally, I untick 'save new credentials', tick 'save new credentials without confirmation' (as I receive a lot of confirmation on KeepassXC application), and click on 'erase selected entries' (I think old linked data was also the culprit) : image At this time, it seems to work as expected. Once again, thanks for your support.

Regards, DicoHub

dico-hubnc avatar Jul 04 '24 07:07 dico-hubnc

Please check the Thunderbird password manager (and the console as well). With your settings now I think the oauth tokens are stored there and not in KeePassXC.

kkapsner avatar Jul 09 '24 12:07 kkapsner

Hello,

Arrggg, you're right. So I just deleted password inside Thunderbird (TB), but now every time a password is requested, KeepassXC provides to TB, and then I got a popup on KeepassXC saying : 'would you like to save modifications on xxx account'. If I do not confirm this popup, the password is saved on TB after a timeout. image I also try to activate 'save new credentials without confirmation' like this : image but no change...popup happens on each TB account's check/verification. It seems that auto-saving password update is not activated.

Update : after closing TB and re-open it, all my KeepassXC's accounts are doubled/tripled... I notice that uuid is null image Inside KeepassXC : (the last entry is the first one that I saved with TOTP, the 2 others are duplicated automatically by TB) image

dico-hubnc avatar Jul 09 '24 21:07 dico-hubnc

but no change...popup happens on each TB account's check/verification.

is this popup from TB or form KeePassXC?

I notice that uuid is null

this means it creates a new entry. For me the automatic update works... but I think I selected "Do not ask me again" on the saving dialog once. So if you do that it might work.

kkapsner avatar Sep 08 '24 10:09 kkapsner

I think I found the issue with the duplications - it seems related to the "auto submit". Please try to uncheck that.

kkapsner avatar Sep 08 '24 13:09 kkapsner

The issue seems to be gone as I did get an answer for my follow up questions for quite a while. So I will close this issue. If it's still present I can reopen it.

kkapsner avatar Jan 13 '25 18:01 kkapsner