Forum Discussion

Garfius Tècnic en trastos i tal's avatar
Apr 18, 2018

Set up internet calendar subscription (ics URL) on Exchange account via EWS or powershell.

The anterprise i am actually working has over 1k accounts on office 365, related to an Unitime appliance, which generates calendars for all of them.

 

 

I have created a script which adds a standard ICS file to an Exchange account via EWS 2.0. But the process is painfully slow (over 9hrs).

 

As i see (and already checked ok) at: https://blog.lboro.ac.uk/middleware/blog/apps-for-education/programmatically-inserting-internet-calendar-subscriptions-into-outlook-web-access-via-exchange-web-services . It seems the internet calendar subscription can be set using Extended propertires of an item.

 

Althrough, already blindly tried a manual set up, but the function: service.convertId seems to have real issues converting owaId to ewsId. https://msdn.microsoft.com/en-us/library/office/bb799665(v=exchg.150).aspx

 

Just need some documentation.

 

Regards

 

 

 

 

  • PowerShell to the rescue:

     

    Set-MailboxCalendarFolder mailbox:\Calendar -PublishEnabled $true

     

    And to get the URL:

     

    Get-MailboxCalendarFolder sharednew:\Calendar | select PublishedCalendarUrl,PublishedICalUrl

     

    • Garfius Tècnic en trastos i tal's avatar
      Garfius Tècnic en trastos i tal
      Copper Contributor

      Thanks, but i am asking for the opposite.

       

      From ICS file/Url ----> Exchange.

       

      Your answer means to give mine to others, but i need to set a published (ouside office) ics file into users calendar folder (inside office). To set the subscription to a 3rd party ics url programatically.

       

      • frybrg's avatar
        frybrg
        Copper Contributor
        Do you have an update for us?
        Does a solution exist today?
    • ChristineStack's avatar
      ChristineStack
      Steel Contributor
      Do you think this will work to get the publish URL for an office 365 group calendar? Too swamped to test myself at the moment but with our MS Teams push we are failing because we cannot share the Teams calendar with our Teams guests.

Resources