iOS 9.3.1 app cannot connect to Nextcloud LDAP user

Device: iPhone 16
OS version: ios 26.4.2
App version: 9.3.1
Mode: Connect to Nextcloud
Additional information:

I have OnlyOffice integrated with Nextcloud 33.0.3 and all my users are managed in Authentik over LDAP. The ios OnlyOffice app worked fine before I switched to LDAP, but now that the uids and home directory names are not the same as the usernames it will no longer connect. I get a red banner at the top of the app that shows briefly but is cut off so it’s difficult to read.

In Nextcloud there is an error message:

Login failed: ‘(uid omitted)’ (Remote IP: '(IP omitted)’)

App token login name does not match

It does this repeatedly until I remove the configuration from the ios app, and can cause the IP to be banned if I let it keep going.

One key piece of information I haven’t found elsewhere is that the desktop apps for Linux, Windows and MacOS all still work. It’s just ios that doesn’t. There must be some difference in the authentication logic between the two.

I know there are similar topics already but they pertain to earlier versions of the OnlyOffice application and the issue still seems to be unresolved.

Hello @Scion

Would it be possible to check the solution provided by my colleague in similar topic?

I’d recommend backing up the server or creating a snapshot just in case of any trouble.

I already have ‘uid’ in the “internal username” section of the expert tab. I followed the LDAP instructions here: Integrate with Nextcloud | authentik

My users in Nextcloud have their display names and email addresses populated from Authentik, and very long randomly generated account names that are like 64 lower case letters and numbers.

Again, OnlyOffice works successfully with the desktop apps. I’ve tried Windows, MacOS and Linux and they all work. So the problem must be a difference in how the desktop app authenticates and how the iOS app authenticates.

Do you require that generated name to log in via web interface in browser or just a regular name?

Edit: please take a look at this topic too: OnlyOffice iOS.app - Nextcloud login fails with non-local accounts
Would it be possible to share Nextcloud logs?

It’s LDAP so you provide your username and password from Authentik. The uid attribute of your user from Authentik becomes the account name in Nextcloud. I think what is happening is Documents is trying to log in with the uid (the 64 character id) and Nextcloud is granting a token for the username (email address) and then the token doesn’t match what the application expects.

In Nextcloud the logs say:

Login failed: 'really-long-uid-here' (Remote IP: '192.168.x.x')

App token login name does not match

When I put a wrong password in from the Nextcloud login screen, it has my email address in the log message instead of the uid. That’s why I think Documents is providing the wrong piece of information for the username.

I see, thank you for the comments. We are checking the situation, please await my feedback.

We have found a bug in scenario when email does not correspond to fullname. I will keep you posted on the resolution.

Awesome, thank you for letting me know!

1 Like