Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import from Microsoft Authenticator #186

Closed
p0358 opened this issue Aug 29, 2019 · 14 comments · Fixed by #304
Closed

Add import from Microsoft Authenticator #186

p0358 opened this issue Aug 29, 2019 · 14 comments · Fixed by #304
Labels
proposal A proposal for a new feature proposal-accepted An accepted proposal for a new feature

Comments

@p0358
Copy link

p0358 commented Aug 29, 2019

Hello, I would be very keen to see such functionality added, it shouldn't be too hard as the format is pretty simple SQLite database, similiar to one of already existing formats for import code.
The database lives in PhoneFactor file, just to make the searching quicker for you.
Microsoft account has a little different format than 3rd party auths with some additional metadata (for MS-specific functionality), but it's also possible to extract the data from it and generate valid codes.

@alexbakker
Copy link
Member

Sounds good. Would you like to work on it?

@p0358
Copy link
Author

p0358 commented Aug 29, 2019

I was planning to get to it for past 2 months and try, even cloned the repo and created the file, but something was always distracting me for the time. Not sure how my coding would fit the codebase either :D

@alexbakker
Copy link
Member

That's fine. We're not in a hurry. We don't have a coding style guide written down yet, but you should be able to infer most of it from the surrounding code. The Google Authenticator importer also reads from an SQLite database, so that might be a good example to refer to.

@alexbakker alexbakker added the proposal-accepted An accepted proposal for a new feature label Oct 16, 2019
@alexbakker alexbakker added the proposal A proposal for a new feature label Dec 25, 2019
@ulidtko
Copy link

ulidtko commented Jan 16, 2020

Perhaps not exactly the problem stated, but I found a workaround of relevant interest.

Turns out, in 2020 you can QR-enroll Aegis into your Microsoft account under a generic "Authenticator app" method. Here's how. Aim at this page -- https://mysignins.microsoft.com/security-info -- on the uncommon rolls when it loads at all and is happy with all its [expiring in mere minutes] authentication credentials, it will load up a list like this:

Screenshot from 2020-01-16 23-09-38

Then trivially, click the Add method plus sign, select Authenticator app, choose "I want to use a different authenticator app":

Selection_001

... and finally, scan the QR code and confirm registration with the 6-digit TOTP.

Tested with a business org account.

@p0358
Copy link
Author

p0358 commented Jan 17, 2020

@ulidtko It's always been possible to add a third party app this way. The point was to import entries from Microsoft Authenticator app, Microsoft accounts and other ones added there. Microsoft accounts have a different entry format, but it's also possible to import them and generate OTP codes for them, pretty much the only difference from the most is that they are 8 digits. Of course something like accepting login requests with accept button would be unavailable then

@ulidtko
Copy link

ulidtko commented Jan 17, 2020

@p0358 well honestly, I didn't even find any "export" function in Microsoft Authenticator app. There is uhhh Export To Cloud only.

So it's not entirely clear what the issue is about... Let's clear that up.

How would the "definition of done" for this issue look like?

  • Aegis supports importing Cloud Exports of ms-authenticator, (or?)

  • Aegis supports opening the DB file of the other app, using root privileges, (or?)

  • There is a convertor service/script/button which turns ms-auth format into standard TOTP format,

  • Aegis can generate exactly the same codes as ms-authenticator

  • Aegis can generate working codes for Microsoft 2FA sign-in [my workaround is here]

Which ones are meant?

@michaelschattgen
Copy link
Member

I'm pretty sure this issue is about these two points:

  • Aegis supports opening the DB file of the other app, using root privileges
  • Aegis can generate exactly the same codes as ms-authenticator
    (which already is the case)

People use the Microsoft Authenticator app in the same way Aegis is meant to be used; generating 2FA tokens for your online services. Users want to switch from Microsoft Authenticator to Aegis without having to manually reset all of their 2FA accounts one by one. This feature request solves that problem. Aegis already supports importing tokens from other 2FA apps (or file formats) such as andOTP, Google Authenticator, FreeOTP etc. and @p0358 requested to add Microsoft Authenticator to that list.

When we implement this feature in the same way as we added the other apps, Aegis will be able to import codes from the Microsoft Authenticator app itself, which requires root, or by file (which also once required root too).

@JonnyTech
Copy link

Will there be a release, which includes this new feature, soon?

@alexbakker
Copy link
Member

The next version will be released when it's ready. We don't do ETA's.

@JonnyTech
Copy link

Thanks, I manually pulled my key from the PhoneFactor file (one can read it with a text editor, at the end of the file just after your email address) then entered it into Aegis and it worked (just in case anyone else wants to know).

@lucknaumann
Copy link

Please excuse my necroing this thread.
@JonnyTech

Thanks, I manually pulled my key from the PhoneFactor file (one can read it with a text editor, at the end of the file just after your email address) then entered it into Aegis and it worked (just in case anyone else wants to know).

Thanks for this information. Where can the PhoneFactor file be found? I have searched the 'Net but have not found an answer.

@JonnyTech
Copy link

It is in the data storage folder of Microsoft Authenticator: from memory something like /data/data/com.microsoft.authenticator/something/phonefactor. You can get to it with a file manager (assuming that you have root access on your device) or from custom recovery such as TWRP.

@JonnyTech
Copy link

From file MicrosoftAuthImporter.java:
/data/data/com.azure.authenticator/databases/PhoneFactor

@lucknaumann
Copy link

From file MicrosoftAuthImporter.java:
/data/data/com.azure.authenticator/databases/PhoneFactor

@JonnyTech Hey, thanks for the response! Unfortunately, my device is not rooted. 😞 Fortunately, I don't have many accounts associated with Microsoft Authenticator. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal A proposal for a new feature proposal-accepted An accepted proposal for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants