Download ICS files from SharePoint calendars

The other day while playing with SharePoint modern Events web part with my colleague Francisca Peixoto we realized that it includes a feature to download an ICS file to then be added to an Outlook calendar.

This discovery also reminded me that I once started a project to provide this exact same functionality on classic SharePoint calendars but never finished it.

After spending a while searching for the code I finally found it, finished the project and I’m sharing it with all of you guys in this article.

Download ICS file from SharePoint calendar event manually

SharePoint has the possibility to generate ICS files from calendars since SharePoint 2007, however it never had this functionality available through the graphical user interface.

They only way to get the file is by using a structured URL in the following format.

https://SITE_URL/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={LIST_GUID}&CacheControl=1&ID=EVENT_ID&Using=event.ics

  • SITE_URL – The URL to the site where the calendar is hosted
  • LIST_GUID – The unique identifier of your calendar list
  • EVENT_ID – The identifier of the calendar event

Getting the LIST_GUID and the EVENT_ID is not straight forward for most users and with that in mind I decided to build a custom solution that adds a small download button on top of each event when the user hovers it. It also adds an extra field to the event detail with a direct link to the ICS file.

How to install the solution

This solution is provided as declarative Sand Box solution (read more about this type of solutions here) and it works on SharePoint 2013 and 2016 On Premises and SharePoint Online classic sites, this solution will not work on modern sites.

If you are using SharePoint Online to accomplish the steps bellow you will need to enable the custom scripts on your tenant, here you have the instructions on how to do it.

  1. Download the solution from here
  2. Extract it from the ZIP file
  3. On the root site of your site collection go to Settings Site Settings Solutions
  4. Upload and Activate the Solution

Once the activation process finishes the solution is ready to be used by all calendars of the site collection.

How to use the solution

To use this solution, you just need to open the calendar and over the item as exemplified in the animation below.

This solution supports the following views:

  • Monthly view
  • Weekly view
  • Daily view
  • Event detail view

How the solution works

The solution deploys a custom action on your site collection, it validates if you are visiting a SharePoint calendar and if you are it automatically gets the LIST_GUID and the EVENT_ID to build the link to download the ICS file.

As always, I made the solution available on GitHub and you are welcomed to contribute to improve it, due to the fact I lost the Visual Studio Project I’m sharing just the WSP files. Instructions on how to modify the solution will be provided in the repository.

Thanks to Justin Shands for the great article Generating an ICAL (.ICS) file from a SharePoint calendar list item, it was fundamental to build this solution.

Download ICS Solution
Explore Solution on GitHub

Designed by Freepik


8 Responses to “Download ICS files from SharePoint calendars”

  1. Brett

    August 21, 2018

    Just uploaded this to my SP2013 site collection and there’s only a single button in the ribbon called “Custom Commands” with a button is called “Export Event”, which works perfect when clicked.
    There’s no button image on the Calendar item and no “Add to Calendar” field on the Display Form.
    Is that correct for SP2013?

    Reply
    • João Ferreira

      August 23, 2018

      Hi Brett,

      Thanks for reporting the issue, in fact there was an issue with the previous version of this solution.
      I’ve made a new version that you can download from the artile.
      To update to the latest version do the following:
      1 – Go to Site Settings -> Solutions
      2 – Deactivate the existent version
      3- Upload and activate the new version

      Let me know if it works for you.

      Reply
  2. Fabian

    November 20, 2018

    Great information! Thanks.

    Even though I don’t use your solution (yet), I just wanted to check whether the URL works and unfortunately, it doesn’t for me.

    The EVENT ID is supposed to be the list-item-ID, right?

    I ended up with a URL like this:
    https://XYZ.sharepoint.com/sites/mysite/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List={6F45A00C-9B89-4F27-953D-47E067CC93C3}&CacheControl=1&ID=3&Using=event.ics

    Reply
  3. Rahul

    August 7, 2019

    I deployed the solution, but cannot see where I can activate it. I do not see in the site collection features or the site features

    Reply
    • João Ferreira

      August 7, 2019

      Hi Rahul, the package is activated in the solution gallery?

      Reply
  4. Arseniy

    May 29, 2020

    Thank you for solution! One question. How to update event in calendar without creating duplicate?

    Reply
    • João Ferreira

      May 29, 2020

      Hello,

      Not sure if I understood your question. What type of events are you trying to edit?

      Have a nice day 🙂

      Reply

Leave a Reply


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.

%d bloggers like this: