I understand a Thunderbird iCloud calendar sync may be a niche use case. However, if you’re stuck with it you don’t care how much of a niche it is. You’ll want clear instructions how to fix you problem, that is how to add an iCloud calendar to Thunderbird – and you’ll get just that here.
Thunderbird iCloud calendar sync
There are two general approaches how to add an iCloud calendar to Thunderbird
- The lame one: a read-only view of any iCloud calendar. I’ll mention it at the very end of this article for the sake of completeness. It’s a pity that Apple only documented this one.
- The real one i.e. just what you’d expect: full integration, editable calendar with two-way synchronisation. Unfortunately, this is more complicated than it could and should be but I guess Apple really wants you to use their apps exclusively.
Connect an iCloud calendar to Thunderbird
Adding any remote calendar to Thunderbird is trivial. However, with an iCloud calendar it’s more complicated than usual for two reasons:
- You need to deal with two-factor authentication (2FA).
If you log into iCloud Apple requires username/password plus a verification code they send to your mobile. Of course, this is not feasible if Thunderbird authenticates itself against iCloud on your behalf. Therefore you need to create an app-specific password for Thunderbird.
- Apple is not willing to reveal the URL to your remote calendar.
If you don’t know the specific URL to your iCloud calendar you can’t add it to Thunderbird. Some digging is necessary to get a hold of this gold nugget.
Thus, we need to complete the above two steps before we can actually add the iCloud calendar to Thunderbird.
A) Create an app-specific password for Thunderbird
In May 2017 Apple announced:
Beginning on 15 June, app-specific passwords will be required to access your iCloud data using third-party apps such as Microsoft Outlook, Mozilla Thunderbird, or other mail, contacts and calendar services not provided by Apple.
Fortunately this is less complicated than it may sound:
- Sign in to your Apple ID account page.
- In the ‘Security’ section, click ‘Generate Password’ below ‘App-Specific Passwords’.
- Follow the steps on your screen.
Gotcha! Take note of the password Apple generated for you as it’s not stored anywhere. Thus, Apple won’t be able to recover it for you!
B) Discover the URL to your iCloud calendar
iCloud calendar URLs for Thunderbird (and other iCal clients) contain three pieces of information that are unique for each calendar:
There are several ways to find the effective values for your specific calendar but none are “consumer-ready”. What I present below is the easiest I could find. Let me know if you found something more user friendly.
If you feel confident running scripts executing the ‘icloud-calendar-urls’ Ruby script instead is a lot more convenient.
- Open the iCloud calendar app in the browser of your choice.
- Open the browser’s developer tools aka inspector. Often hitting F12 gets you there but the below table has all the details:
Google Chrome Firefox Internet Explorer/Edge Safari MacOS ⌘+⌥+i ⌘+⌥+i n/a ⌘+⌥+i Windows ctrl+shift+i ctrl+shift+i F12 n/a
- Open the ‘Network’ tab in the devtools
- clear any entries that may already be there to empty the list (in Chrome: crossed-through circle icon, 2nd from left)
- filter for ‘collections’ (enter that into the text field)
- activate only the ‘XHR’ requests
- Now, on the iCloud page, click the checkmark on the left side of the calendar you want to integrate into Thunderbird.
- The inspector will record a HTTP request against URL that looks something like this
https://<server-number>-calendarws.icloud.com/ca/collections/<calendar-id>?<lots-of-keys-and-values>&dsid=<user-id>&yadayada-etc. Extract server number, calendar ID and user ID and keep them somewhere handy.In my case the user ID is a 9-digit number and the calendar ID consists of 40+ alphanumeric characters and dashes.
- Extract the three highlighted pieces of information.
Alternatives for tech-savvy folks:
- open-source iCloud discovery client (Docker or PHP or Groovy/Java) by Daniel Mühlbachler
- poking through
/Users/<your-username>/Library/Calendarson the Mac. This can be simplified by running the ‘icloud-calendar-urls’ Ruby script.
C) Create calendar to Thunderbird
You’re home free! The last step is a trivial one.
In Thunderbird open the ‘Calendar’ tab, then right-click on the left side in the calendar list and select ‘New Calendar’.
In the next dialog select ‘On the Network’ and hit ‘Continue’. The calendar URL you extracted in the previous step needs to be entered in the following dialog after you select ‘CalDAV’ as your calendar format.
Again, the URL is https://<server-number>-caldav.icloud.com/<9-digit-user-id>/calendars/<calendar-id>/. The actual values for the <xxx> tokens is what you collected in step B.
Thunderbird will then ask you for a password at which point you enter the app-specific iCloud password generated in step A).
Congratulations, well done!
The lame approach, adding a read-only calendar
As I said earlier it’s fairly straight-forward to add an iCloud calendar to Thunderbird in read-only mode but who would want that? FWIW here’s how:
- Open the calendar app on the Mac.
- Right-click a specific calendar.
- Select ‘Share Calendar’.
- Click the ‘Public Calendar’ checkbox in the dialog.
The URL displayed after the last step can then be used to create an iCalendar (ICS), not CalDAV, in Thunderbird that is read-only.
68 thoughts on “Thunderbird iCloud calendar sync”
Thanks for your interesting post. I gave it a try and it happened to work.
Though, in some unclear circumstances, the calendar server seems to be disconnected.
The only workaround I found, was to unsubscribe from the icloud calendar and recreate it. In some cases I need to repeat the operation several times, until I am requested to log in again.
Any explanation for this behaviour ?
Many thanks. This worked nicely. Just as you had written. I did find using the Header inspector an easy way to find the values. I also found calendars were greyed out (disabled) if I got the calendar-id wrong. Which for the cal ‘Calendar’ is easy ass that one has a long-value, not the word ‘Calendar’ 🙂
Nice! This works quite well, the only problem I see is that sometimes reminders don’t seem to be dismissable. A small nuisance, but by disabling the reminder dialog (and sound) this is solved (sort of).
Tried it and was able to set up 2 calendars, however Thunderbird never asked for a password and the calendars both show momentarily unavailable and don’t seem to change. So not working. Any ideas? I pasted the entire URL in for location which is what you said to do. Except at first you said to extract just the server number, calendar ID and user ID. This was just a bit confusing. Anyway seems that something went wrong.
There is also a drop down to associate an email address with the new calendar during the setup. Does that make any difference?
I think you used the wrong URL for the calendar, at least that was it when I first tried it (it also didn’t ask for the password).
The URL you need to use is: https:/xxx-caldav.icloud.com/xxx/calendars/xxx/
(using the info you gathered in the described steps).
The e-mail address is only important for the replies (e.g. when you accept an invitation); the one you selected will be used to send the reply from.
Yes, finally got it. Seems to be working ok so far. thanks for the reply.
This part is very confusing.
“The calendar URL you extracted in the previous step needs to be entered in the following dialog after you select ‘CalDAV’ as your calendar format”
I copy and pasted the url. That did not work.
Thanks to Hayo Baan for this.
The URL you need to use is: https:/xxx-caldav.icloud.com/xxx/calendars/xxx/
(using the info you gathered in the described steps).
I got it to work after adjusting the url.
Thanks to OP Marcel Stör and Hayo Baan.
I’m still convinced that if you follow the tutorial carefully everything should be clear. However, your comments show I may be wrong. I, therefore, slightly adjusted the text that might have caused some confusion.
I have been trying for over a year to setup iCloud calendar in Thunderbird. This tutorial enabled my success! Knowing how to extract the info for the correct URL had been the challenge. Not for the faint of heart or casual everyday user, but do-able by anyone who will carefully follow these instructions. Thank you!
I did exactly as noted with the URL in the format you specified with the extracted three pieces of info info that I was able to get following your instructions – doesn’t work though – gets a greyed out Calendar even after multiple attempts – any suggestions? Thanks
Bryan, did you create an application password like described and did Thunderbird ask for it? If not, it probably has an older, invalid, password saved for the calendar. Go to Preferences|Security|Saved Passwords and remove the existing calendar passwords and then try again.
I had a similar experience with one calendar that I found in an Info.plist file. I suspect it is an old one that I have deleted. Others work – the one called ‘home’ should be the easiest to connect to, I think.
Hi there – yes got it working thanks – in the URL the you use to determine the three tokens, the order of the second and third tokens is the reverse of that in the URL required when setting up the new calendar in Mozilla- once I reordered the last two tokens it was fine. Thanks. Bryan
Newbies should be aware that the option to generate app-specific passwords is only available if the user has activated two-factor authentication for their Apple ID. Only one extra step, sure, but worth mentioning.
True, I didn’t know that not running with 2FA was still supported by iCloud.
Doesn’t seem to be working for me – I’ve followed the instructions exactly, but the iCloud Calendar checkbox immediately and automatically gets unchecked after Thunderbird starts. Error console says
[calCachedCalendar] replay action failed: null, uri=, result=2147500037, operation=[xpconnect wrapped calIOperation] calCachedCalendar.js:330:29
Works a treat. Hve set up two calendars with no problems. Thank you very much for this.
Thanks for the detailed write-up, much appreciated. The only part that I was getting confused was in specifying the .caldav.icloud.com/etc…..
In my set-up it was in fact just a port no., in the format of “pXX” where XX were two digits. I was expecting a very long identifier as the for the other and .
Thanks for the great write-up, works like a charm!
Hello! After all this steps
My server number has only one letter and two numbers but despite this fact thunderbird accepted everything but in the end he asked me for USERNAME and PASSWORD for that URL… Should I write in this windows my Apple ID and password or what? I have my generated password but everything what I writing is wrong… :/
Thanks for Help
Use your Apple ID for username, and the App Specific Password you generated.
Thanks very much for this. I did try a recursive grep in the Info.plist files but I couldn’t see the wood for the forest. I wasn’t familiar with the devtools in Firefox and wasn’t sure what was meant by ‘clear any entries’. Eventually, I stumbled across the little ‘x’ on the RHS that does just that (might be helpful to add it to your useful screenshot?).
I think there might be a typo around the region of ‘server number’ as most I’ve seen referred to seem to be three characters, not 40.
Some of my calendar IDs are easily legible (eg: ‘home’, ‘category167844’) but others are a long string of numbers, capital letters and dashes (about 36 in total). Seems no rhyme or reason to it.
It’s a pity someone can’t write a Lightning add-on to link to iCloud – I have a couple of neat ones for my Android phone. The calendar link automatically finds all the calendars and even picks up the colours I use for them on my Mac. Another for iCloud Contacts. (Smooth Sync for Cloud Calendar, if anyone is interested). I was very happy to pay the £2 for each of them and would be happy to pay for a Lightning add-on.
A bit tricky at first, but after reading some comments I managed to get it done, and it works perfectly well!! Many thanks!!
Hi- thanks for this- after repeated attempts I can not get the icloud calendar to stay on (select “switch on” in properties, the rick appears on the right hand side then disappears- and the URL has been triple checked- any thoughts?
Great article and thanks for working all that out….so desperately needed to get away from iMail and the default Apple Calendar apps and into a single ‘does it all’ app like Thunderbird, but couldn’t work this out. Well done and a huge thanks from me!
Super helpful and very clear. I tried to figure out how to do this a while back and had given up. thank you!
It worked perfectly to me, thank you!
Thank you for this tutorial.
Unfortunately I’m not able to find the URL adress without more little help.
The adress I obtain is : https://p11-calendarws.icloud.com/ca/collections/work?clientBuildNumber=5246Project87&clientId=74U78E98-T67E-32U0-720U-74YT0ROF8E63&clientMasteringNumber=74YR639&clientVersion=5.1&dsid=6501894302&endDate=2018-11-04&lang=fr-fr&methodOverride=PUT&requestID=9&startDate=2018-09-30&usertz=US%2FPacific
(I’ve change the « codes » but it’s the form I have.)
My is p11
My is 6501894302
And my is ?? I don’t know
Is it : work?clientBuildNumber=5246Project87&clientId=74U78E98-T67E-32U0-720U-74YT0ROF8E63&clientMasteringNumber=74YR639&clientVersion=5.1
Or just 74U78E98-T67E-32U0-720U-74YT0ROF8E63
Or another thing ?
Ok I find myself the solution in my Mac library.
Here a link that helped me.
Why don’t mozilla just fix it properly so it’s dead set easy to set up just like all the other email clients I have tried everything and the dam thing never syncs I always have a blank calander just properly fix it guys.
Thanks. Finally a clear instruction from iDevice to Windows device. If I can do it, anyone can!
I try several times, 1-2 hours :P, but I finally succeed!!!!
I recover the server number : XX (2 digits)
My user ID (dsid) : XXXXXXXXXX (10 digits)
But for the calendar ID, it was not clear. I was looking for an ID consisting “of 40+ alphanumeric characters and dashe” as precised in the article.
So I found several codes which could be the good one : clientBuildNumber, ctag, etag, clientId, clientMasteringNumber, ifMatch,…
But none of them work… until I try to configure with what was written exactly between “…/ca/collections/” and “?”
In my case, it was just “home” and it works!
So, here is the link I used to setup Thunderbird :
But for my second calendar (shared from the iCloud account of my wife to my iCloud account), the calendar-ID was a 64 alphanumeric code. With the same server ID and the same user ID as for my own calendar.
Hope this feedback will help.
@Marcel, the author : add perhaps the information that the first calendar might have “home” as a Calendar-ID… 😉
I followed the directions, but am getting stuck in the last step. I extracted the 3 items from the URL but it is unclear to me where to put those items in the calendar settings of Thunderbird. It asks for a Calendar name and color (no problem), then it asks for a username and location. I don’t know what specific information that I extracted goes into those fields. At the bottom it also asks for an email address which I assume is my icloud user name or perhaps it is my Apple ID.
I did get it to work. Perhaps a screenshot of what it looks like when entering it into Thunderbird would help. After you say, “In the next dialog select ‘On the Network’ and hit ‘Continue’.” Perhaps say “Enter your user name which is your Apple ID and Location which is the URL created using the 3 parts of data you extracted above. The location URL will look like the sample below:
User Name: Your apple ID
Location: https://p51-caldav.icloud.com/183230555/calendars/home/ (see below)
After entering that information hit Next and enter your name “Joe Smith” , choose a color, Select Show Reminders, and enter your email 55JoeSmith555555@icloud.com (not sure how this email impacts the setup I used my icloud email. Is that correct or should it be the apple ID?). Click Next and it will prompt you for your user name (it will fill in your Apple ID) and password (Generated on Apple’s website https://appleid.apple.com/ ) This can only be generated if you have turned on 2 Factor Authentication. I also selected Use Password Manager to remember my password” and clicked OK. Then you can click on Finish. Now you are all set.
Thank you for this article. It got me 98% of the way there and perhaps if I read it more carefully I would have gotten 100% there on the first try. I hope this information above is helpful.
Your version above worked perfectly for me. My confusion was in the format of the URL. This URL below is the one that worked for me, but with my account information instead of this example:
I had set this up in TBird 68, but v78 downloaded itself on me a couple days ago, and made a mess of a bunch of things–including this. Afaict, this no longer works, and there’s no obvious answer. Is anyone else having a problem with TBird 78?
Replying to myself: it turns out it works, half way. In particular, my TBird calendar can get events from my iCal, but not vice versa. I was only testing the TB –> iCal before. Also misleading is that there’s a “Enable” button next to my iPhone calendar icon in TBird’s list of calendars, and clicking it seems to do nothing, nor does clicking the “Enable this calendar” box in the icon’s properties. No obvious fix for that, although I assume somewhere there’s a read-only setting. But where?
I get this far, too. Calendar subscribed, but never Enables. When you subscribe or click Enable,iIt shows an “HTTP 1.0/1.1 error 403 Forbidden” in the Error Console [shift-ctrl-J to display). Tbird v78.5.0 (32-bit) w/ TbSync and Provider CalDAV & CardDAV add-ins since Lightning is not supported with 78. That says it isn’t getting permissions to the calendar correctly, but I don’t know why and Apple support is worthless and says it’s Tbird’s job to sort this. Any help here desperately appreciated.
NickoLabs has identified an answer, below — switch the 9-digit USER-ID to be the 2nd component and the LONG STRING calendar-ID to be the last component of the calendar pathname.
It still works for /me/. TB 78 switched the calendar to read-only but unchecking the respective option promptly turned it into an editable calendar again.
SCORE!!! This worked for me to get it going.
Very helpful tutorial and I might redo a French version of it. I recently switched to a PC Laptop and not having my calendar on the PC was bothering me.
Only issue with the tutorial is that when TB asks for the Username, you need to provide it your actual icloud username, and not the UserID gathered from the XHR URLs, which are two different things, as mentioned in a previous comment.
As for the Location, it should look like https://pSOMENUMBER-caldav.icloud.com/USERID-9DIGITS/calendars/SOME-LONG-SERIALISED-STRING
Make sure you follow the tutorial step by step.
SCORE!!! This worked for me to get it going with TB 78.
Thanks for this!
Thank you Marcel Stör for this thread. Today I tried your solution, but it did not work for me. Then I tried TB extensions TbSync by John Bieling, this wants another plug-in Provider for CalDAV & CardDAV also by John Bieling and all these works fine. Multiple calendars and even contacts are now synchronized with Thunderbird. May be helpfully for someone here.
I have struggled to make it work. Other webpages suggested to spot and use the “guid” in the iCloud URL instead of the long “calendar-id” string – see e.g. https://www.techrepublic.com/article/how-to-find-your-icloud-calendar-url/. Instructions were provided to find the guid in the iCloud Calendar URL console. When I searched for “guid”, I found “work”. I was puzzled. Did not think it would work. Guess what? It did! My iCloud URL looks like this: https://pXX-caldav.icloud.com/YYYYYYYYYY/calendars/work/, where “XX” is the server number, “YYYYYYYYYY” is the dsid, and “work” is the gsid (which is actually the calendar name in iCloud). My instructions are pretty much in line with those of jimtanis above. Hope this helps.
Thank you for this info. I tried also this short variant, just with ../calendar(s)/work, but did not work, just with the short user id. What username is working for you? name without @icloud.com or email@example.com? For me, then the extension TbSync worked fine now, but it would be nice, to have the knowledge, how it works manually.
Thanks worked well also for me. Perhaps the adjustment to the wording did the trick 🙂
Thank you for that tutorial, it helped me integrating the calendar into Thunderbird.
But: Once the calendar is there, it does not synchronize but shows a button “enable” which appears every time after clicking on “enable”.
Also, not a single calendar entry appear.
Please let me know, if you have any suggestions!
Thank you so much!! The only guide that actually works..
This is great, but the example doesnt quite work now with current situation.
First as pointed in another comment – it also asks for username, give it your apple id e.g. firstname.lastname@example.org or email@example.com
Secondly – after the password, it pops up a “Create New Calendar” window, which says there are multiple types of calendar – it preselects CalDav so all is good EXCEPT – this window is greyed out, and underneath the main calendar window, and is unselectable. The trick is to go to Window-Minimize which removes the default TB window, and allows interaction with the background window to click “Subscribe”
Works absolutely perfectly as laid out in your article! Thanks for making this so easy,
Thank you so much for this advice. Works perfectly on Windows 10 with latest version of Thunderbird and ios on iPhone. Thank you so much!
You Rock! Well written.
Thank you so much for this guide! Doing the lord’s work. I now have full Apple Calendar functionality in Thunderbird 78 on Linux.
Thank you for this!! Worked as advertised!
Thanks! I’ve been using this for some time now.
Is it possible to get iCloud Reminders inti Thunderbird in the same way ?
TB tasks appears roughly equivalent to Apple Reminders. However, there is no exchange data format for tasks/reminders I am aware of (like there is iCalendar/.ics and CalDAV for calendars). TB tasks are always local and cannot be loaded from remote resources.
This worked well for me, so thank you. The one thing I noticed was that the calendar ID for me was simply the name I had given the calendar, rather than the alphanumeric string, which was the same for both of my calendars. It works, though!
Quick note, I have tried to sync Thunderbird 102 calendar with my icloud account, and the procedure still works, thanks. I’m a first time user of Thunderbird and I was about to dump it as I was unable to sync my icloud when I was told about this page. Well done, well documented. I had to read it very carefully but after several attempts and re-reading rather than skimming. all worked and I have have 2 way syncing with all my devices and my desktop (Windows 11) finally a simple way of syncing my PC with my Apple stuff. Outlook was very finicky and now I’m happy and comfortable with a fully working process. Thanks again.
Excellent tutorial. With careful reading it simply works!
Now I am trying to synchronise my iCloud Contacts (as complement to the calendars) with TB using the same logic. Unfortunately no success so far…
Does anyone know the structure that enables you to extract the contacts ID from Firefox inspector and thus construct the iCloud URL for a new cardDAV address book in TB?
@Micha – Thunderbird should recognize the contacts on your device, but since OSX11.4 it doesn’t. See the bug I reported at https://bugzilla.mozilla.org/show_bug.cgi?id=1720257 . There is a workaround there of going back to an earlier TB connecting contacts, then upgrading – but see the bugzilla for details.
Please excuse my poor english.
It seems it’s not working on MacOS Ventura. There are no .caldav files in ~/Library/Calendars
Thank you for help.
Viile Dangg, super Anleitung!
Worked for me with a slight modification: what is called “user-id” in this guide seems to be called “dsid” now and can be found in the get-request url as described above.
Some minor differences with Thunderbird v102: This version of Thunderbird natively supports CalDEV calendars, so there’s no opportunity to select the calendar format. Also, there is a user id field not mentioned in the article. Put your appleID in this field.