I had a very annoying problem recently when setting up a couple of new iMacs for a client.
Although their email and calendars are hosted on Office 365, they also have a very specific shared calendar that is hosted on an on-prem CalDAV server. This server has a self-signed certificate and in my googling it looked like newer versions of macOS don’t like CalDAV with a self-signed cert. I have however upgraded a few Macs for them recently to Ventura and this shared calendar has worked with no problems coming through either via upgrade or via Migration Assistant.
When I went to set up these two iMacs however, with a complete clean install, I was simply unable to add the CalDAV account – I’d enter the credentials, it would sit there and spin and then say unable to verify username or password. I was 100% certain that I had the correct username and password and checking the logs on the CalDAV server showed there was no login attempt.
I fired up the Console app and set it to filter events from the Calendar process. This showed that the process was taking the URL I’d given it (e.g. https://mail.example.com/caldav), extracting the server name (mail.example.com) and the path (/caldav) and determining that SSL was enabled (https) but it was unable to determine the port number. Yes, it couldn’t guess that an https connection should have been on port 443.
In the account settings, I had to enter the URL instead as https://mail.example.com:443/caldav and it worked first go.