Nextcloud Calendar not working with Onecalendar, "Not Authorized" error when using proper credentials and links

Nextcloud version (eg, 29.0.5): 29.0.5
Operating system and version (eg, Ubuntu 24.04): Unraid
Apache or nginx version (eg, Apache 2.4.25): Unsure, installed with Docker
PHP version (eg, 8.3): Unsure, installed with docker

The issue you are facing: When attempting to use the calendar app Onecalendar, it throws a “Not authorized” error when using proper sign-in.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Attempt to link Nextcloud calendar with Onecalendar
  2. Enter correct credentials
  3. “Not authorized” error with no further information

The output of your Nextcloud log in Admin > Logging:

Nothing relevant, it doesn't even throw anything here

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Cannot find this file in appdata/Nextcloud

The output of your Apache/nginx/system log in /var/log/____:

I don't think I have Apache? I have Unraid

I’m rather inexperienced at all this, Nextcloud and Unraid have been a big “nerd’s first server” situation here. I just want to get the self-hosted calendar to work, since the nextcloud app doesn’t have calendar support, or its own calendar app, I chose Onecalendar for its integration. However, it’s throwing this error that for all I can find, just does not exist on the internet. I have the correct credentials, and nextcloud is accessible outside the network by both my mobile app and web browser perfectly fine, it’s just the calendar I can’t get access to.

My Nextcloud is in docker on my Unraid server behind a subdomain of my domain, through the swag reverse proxy. It’s basically base install from the Spaceinvaderone video I followed to install it, only changes I made was enforcing MFA and disabling richdocuments since I don’t use it and it was throwing a million errors into the console. Any insights or help would be immensely appreciated, I feel like I’m so close to finally having a usable calendar I don’t need to rely on google for.

I can only guess at what the issue is, which maybe it’s my enforement of Authenticator for my user accounts? I know for sure it can talk to my server because if I change the password I get invalid password errors, and if I change the link I get server not found errors.

If any specific information is needed I will do my best to acquire it to make this process smoother, though bear with me as I’m not very familiar with linux operations so I may need to ask for additional directions to find things.

You need the DAVx⁵ App for the connection between smartphone and your nextcloud calendar.


Much and good luck,
ernolf

Hi! Thank you so much for responding to my post.

I took a look into this app you recommended thinking it was some sort of apps package for Nextcloud, but it seems to be an app only be for androind with no iOS equivalent. I do apologize for neglecting to include this information but I am using a pair of apple devices (ipad and phone) to access my calendar on the go.

I have also attempted to use the built-in calendar with CalDav on iOS with the same results, After signing in with my user account (not an admin account since that felt vulnerable) it just throws a “CalDAV account verification failed” error after a long while, unsure if this info helps at all.

I have a feeling in my gut that I must be missing something critical on my server to enable this feature at this point, but I’m still having trouble determining what that could be, I’ll continue to try and do research and will make another post if I find another solution, though obviously further guidance would be extremely appreciated!

OK, I see.

This must be the reason why it does not work:

Some external applications such as your calendar app cannot handle multi-factor authentication. Therefore, you must create a device-specific password for your calendar app, as → described here ←
With device-specific passwords, you cannot log into the web interface and thus strangers cannot take over your cloud with such a password. However, they do provide access to functions such as calendars. Any passwords that have ever been created can be deactivated from within the security tab of the user interface. So if, for example, the iPhone is ever lost, access to the calendar can be blocked remotely.


Much and good luck,
ernolf

I thought we were finally on the right track, I finally had some time so I excitedly gave it a shot tonight and was able to generate a password, but onecalendar still threw the same not authorized error, and the built-in apple calendar app also gave the same failure message as before.

In a hail mary attempt, I disabled two factor enforcement as my admin account and tried again both with the generated and my normal account passwords with no success either.

HOWEVER I was able to access the calendars using the device-specific password via thunderbird on my PC as just a random test I thought of just during the writing of this post. So now I’m 100% sure it’s something to do between nextcloud and IOS in some way at least, so maybe that helps narrow issues down some. And this was with authenticator being enforced again post hail-mary.

Could this issue have something to do with my system sitting on a Swag reverse proxy? (Was a part of the installation per Spaceinvaderone’s tutorial) I’m really reaching for ideas at this point since my instance is still very stock, and I can 100% access it via web and official nextcloud apps on the same devices with absolutely no issue, and now with this last test desktop thunderbird as well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.