Hi,
I am experiencing some problems setting up an MS outlook/office365 account. Prior to 26 Oct 22 the setup worked fine on Mail but everything crashed yesterday. As I understand it MS no longer support the password option but use Oauth2 login. Problem arose when authentication failed in Mail. I deleted the account and recreated it. Despite numerous approaches (including setting up email address on K9 Mail and FairEmail apps and installing MS Edge) I could not get the Oauth2 to work for Mail. I did get it to work correctly for K9 Mail and Fair Email by switching off Advanced Privacy.
With the /e/ Mail app the problem occurs when the authorisation step moves to the login web page of outlook login, the correct email address appears, once the password is enter the login pages either never finds the server or just freezes stating that you are trying to login into K9 app. However, on this step with the K9 mail app the authorisation finds the server and goes straight through to the email page and works correctly at this stage.
I can work around this by using another email app but it is a bit cumbersome.
Thanks for any suggestions?
btw, it would matter on what /e/ Version you run. The Mail app is a k9mail fork. The fork got updated in v1.2 to k9mail 6.2+ - so Oauth2 should work after v1.2. If it doesnāt it shouldnāt be due to Mail then.
The Advanced Privacy hide-my-ip (Tor) feature is controversial so I leave it off most of the time. But according to user thilo in the gitlab issue it is surprisingly not due to Tor, but a tracker-block that targets login.microsoftonline.com that hinders the Oauth2 flow to work:
ā¦ it seems like the tracker displayed as āMobile Engagementā is blocking
login.microsoftonline.com
https://gitlab.e.foundation/e/backlog/-/issues/5855
If you want to keep tracking-blocker enabled, allow this (wrongly identified) tracker
ā¦ this is at least a (bad) case where functionality and tracking are closely coupled
that one tracker rule had quite some impact:
Thanks Tcecyk,
I am running /e/V1.4 so I think I should have the latest Mail.
With Fair Email app (works) Mobile engagement tracker was active - I have switched that off - but it seemed to work whilst tracking. WRT to Mail I only have google analytics and generic āBlock trackersā option. I switched those both off for Mail and added my Outlook/Office365 account - still does not work - gets to a webpage with my email address and states: Are you trying to sign in to K-9 Mail with the option to cancel or continue. Pressing continue does nothing.
However, I found that I was using DuckDuckGo browser and not the /e/Browser, DDG would not load my outlook a/c but /e/Browser did!
So I have gone and removed DDG so default is /e/Browser and I get further - MS outlook login page but it never completes the operation. When I try again I get back to the K-9 question above. Even with Switching phone off, clearing all data from I still end up on the K-9 page above
I will try again with a restartā¦
Just a small addition to the above. I have made DuckDuckGo default and able to load online the outlook account by ensuring tracker Mobile Engagement is enabled. Thatās a big step!
I went back and tried DDG with a clean install to set up my outlook a/c using DDG and it still goes to the āAre you trying to sign in to K-9 Mail with the option to cancel or continue. Pressing continue does nothing.ā option.
now lets play 4d-chess and use Firefox as webview with ublock disabled? it reads like youāre fighting tracker blocking in different layers ā¦ some browser that doesnāt block the Authentification request to microsoft to get past Oauth2
having adb logcat running while pressing the button (that does nothing) would help to have a tangible error message to go search for causes - thereās also chrome/firefox remote debugging to check which request it is blocking
Thanks,
I have tried unblocked MS Edge - thatās 3 browsers, at least 2 with Privacy off, also browsers with mobile engagement switched off. None of it works. I agree itās a blocking issue but I am afraid I have given up the will to live on this one and will switch over to another Mail app.
Thanks for your suggestions and time - however, Mail should not be that difficult to operate
Make sure the outlook app uptodate.
That was my solution
Thanks for the suggestion, however, I am using /e/ Mail and not Outlook app. Both Mail and /e/ operating system are up to date.
Have tried with Firefox - gets to a slightly different place but still ends up with same issue of trying to confirm the use of K-9 app but does not progress. That is the fourth browser I have tried
I unearthed an MS account and tried to get some debug. The issue seems to be the return of the browser auth to k9 with a intent that contains the auth (ādat=msauth://com.fsck.k9/ā¦ā)
E App : failed to start third party app activity
E App : android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=msauth://com.fsck.k9/Dx8yUsuhyU3dYYba1aA16Wxu5eM=?code=hunter2 flg=0x10000000 (has extras) }
E App : at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2071)
k9 is registering for that intent at https://github.com/thundernest/k-9/commit/598a1714645f49393ebc47f602c73d94f1eb730c#diff-81a6b9bb5c611adff17d82e07aedd503b429601629b51532e950e4b80d8c6348
so my wild guess - not familiar with Android appdev much, the Manifest uses the appid as variable at
<data android:scheme="msauth" android:host="${applicationId}"/>
and I wonder if this collides with the appid customization to foundation.e.mail at app/k9mail/build.gradle Ā· a59f9b37 Ā· e / os / Mail Ā· GitLab
as the scheme the mail intent is listening for dat://foundation.e.mail/ā¦ but mail emits the k9 appid host.
So I guess the constant OAUTH_MICROSOFT_REDIRECT_URI
at app/k9mail/build.gradle Ā· a59f9b37 Ā· e / os / Mail Ā· GitLab needs to be adjusted
Edit: filed at Mail and microsoft Oauth2: No Activity found to handle Intent (#6198) Ā· Issues Ā· e / Backlog Ā· GitLab
Any news yet? I am havng the same issue related to MS Outlook accounts and OAuth2 with latest build /e/ OS 1.15ā¦
Morning, I donāt know - I gave up trying to use the e Mail app and used a different app - FairEmail - it works fine. Sorry I cannot help.
looks like /e/ v2.6 will have the MR to make this all work - feat: support microsoft login (#6198) (!161) Ā· Merge requests Ā· e / os / Mail Ā· GitLab