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

Mail accounts with domain @bildung.gv.at using outlook.com don't authenticate with xoauth2 #8916

Open
flowlee opened this issue Sep 30, 2023 · 11 comments

Comments

@flowlee
Copy link

flowlee commented Sep 30, 2023

Steps to reproduce

  1. Attempt to add a new mail account with @bildung.gv.at domain
  2. Enter correct details
  3. IMAP and SMTP servers are correctly identified as outlook.office365.com and smtp.outlook.com
  4. Click "Connect".

Expected behavior

According to #7722 there should be an option to authenticate via Microsoft.

Actual behavior

No popup is opened and there is no redirect to authenticate via Microsoft.

Error message: IMAP username or password is wrong

Mail app version

3.4.0

Mailserver or service

outlook.com

Operating system

Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database

MariaDB

Additional info

Email accounts using this domain are the official addresses used for education by teachers in Austria.

@ChristophWurst
Copy link
Member

Have MS OAuth client ID and secret been configured in the admin settings?

@flowlee
Copy link
Author

flowlee commented Oct 1, 2023

Thank you for the hint.

The problem is that I can't register an application since these addresses are pretty locked down and I don't have permission to do that. I tried registering an app for another account but that predictably doesn't work either.

oiKEvXmGkW0RheAn

Is there no way to do this without administrative rights?

By the way, the popup did appear once I entered the client ID and secret, but in the manual settings it still says "Connect to Google".

@Arcau
Copy link

Arcau commented Oct 12, 2023

I too am having an issue with this.
I have setup the App registration and everything as per the guide.
However after the pop up comes up the mail app only shows

image

When clicking into the mail account to check settings it shows down the bottom.
And when attempting to "recconect"

image

No mail ever actually loads in

@ChristophWurst
Copy link
Member

"There was an error"

-> give us relevant console logs and nextcloud.log entries

@Arcau
Copy link

Arcau commented Oct 13, 2023

Sorry I thought I had attached the paste bin link :/

https://pastebin.com/NbjR68SH

@ChristophWurst
Copy link
Member

The account has no access token. Decryption of the empty value fails.

@ChristophWurst
Copy link
Member

Second error happens because the account has no account name (e.g. "Jane Doe"). It might just be empty and therefore appear "missing" on as HTTP body argument. Check if your account has a name set.

@Arcau
Copy link

Arcau commented Oct 13, 2023

The account has no access token. Decryption of the empty value fails.

Forgive my ignorance on this one, is that the app integration portion?
image
I followed the steps in the guide linked above and did get the prompt to allow access.

I have removed the account and tried to re-add.
On the first attempt it errors.
On the second it then prompts the pop up
image
Attempting to add the account with
image
Have changed Name to see if that helped but the same issue happens.
I can hit the connect button multiple times to get the approve prompt.
and it will add the account multiple times, but not actually connect.
image
I tried to name the account differently to my Nextcloud username also but no luck it seems.

@ChristophWurst
Copy link
Member

ChristophWurst commented Oct 13, 2023

It's about the name you enter for the account in Nextcloud Mail

Setup Settings
Bildschirmfoto vom 2023-10-13 10-18-57 image

@Arcau
Copy link

Arcau commented Oct 13, 2023

image
I try with Just First and also First and LastName
image

the logs show some DNS fields also but the DNS server shows a pass through to Outlook
image
When trying to add it in fresh with all traces removed, I get errors as this.
image

However I have copied the secret from my AAD so it is correct. Unsure why it is giving this error.
I have also double checked that permissions were set for the app registration also
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants