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

%3CLINGO-SUB%20id%3D%22lingo-sub-184141%22%20slang%3D%22en-US%22%3ESet%20up%20internet%20calendar%20subscription%20(ics%20URL)%20on%20Exchange%20account%20via%20EWS%20or%20powershell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184141%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20anterprise%20i%20am%20actually%20working%20has%20over%201k%20accounts%20on%20office%20365%2C%20related%20to%20an%20Unitime%20appliance%2C%20which%20generates%20calendars%20for%20all%20of%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20script%20which%20adds%20a%20standard%20ICS%20file%20to%20an%20Exchange%20account%20via%20EWS%202.0.%20But%20the%20process%20is%20painfully%20slow%20(over%209hrs).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20i%20see%20(and%20already%20checked%20ok)%20at%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fblog.lboro.ac.uk%2Fmiddleware%2Fblog%2Fapps-for-education%2Fprogrammatically-inserting-internet-calendar-subscriptions-into-outlook-web-access-via-exchange-web-services%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblog.lboro.ac.uk%2Fmiddleware%2Fblog%2Fapps-for-education%2Fprogrammatically-inserting-internet-calendar-subscriptions-into-outlook-web-access-via-exchange-web-services%3C%2FA%3E%20.%20It%20seems%20the%20internet%20calendar%20subscription%20can%20be%20set%20using%20Extended%20propertires%20of%20an%20item.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlthrough%2C%20already%20blindly%20tried%20a%20manual%20set%20up%2C%20but%20the%20function%3A%20service.convertId%20seems%20to%20have%20real%20issues%20converting%20owaId%20to%20ewsId.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Foffice%2Fbb799665(v%3Dexchg.150).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Foffice%2Fbb799665(v%3Dexchg.150).aspx%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20need%20some%20documentation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-184141%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ecalendar%20sharing%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EEWS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20Apps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOWA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-255096%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20internet%20calendar%20subscription%20(ics%20URL)%20on%20Exchange%20account%20via%20EWS%20or%20powershell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-255096%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20do%20it%20too.%20Did%20you%20find%20a%20solution%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERgds%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184690%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20internet%20calendar%20subscription%20(ics%20URL)%20on%20Exchange%20account%20via%20EWS%20or%20powershell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184690%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%20but%20i%20am%20asking%20for%20the%20opposite.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20ICS%20file%2FUrl%20----%26gt%3B%20Exchange.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20answer%20means%20to%20give%20mine%20to%20others%2C%20but%20i%20need%20to%20set%20a%20published%20(ouside%20office)%20ics%20file%20into%20users%20calendar%20folder%20(inside%20office).%20To%26nbsp%3Bset%20the%20subscription%20to%20a%203rd%20party%20ics%20url%20programatically.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-184383%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20internet%20calendar%20subscription%20(ics%20URL)%20on%20Exchange%20account%20via%20EWS%20or%20powershell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-184383%22%20slang%3D%22en-US%22%3E%3CP%3EPowerShell%20to%20the%20rescue%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESet-MailboxCalendarFolder%20mailbox%3A%5CCalendar%20-PublishEnabled%20%24true%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20to%20get%20the%20URL%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGet-MailboxCalendarFolder%20sharednew%3A%5CCalendar%20%7C%20select%20PublishedCalendarUrl%2CPublishedICalUrl%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-752745%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20up%20internet%20calendar%20subscription%20(ics%20URL)%20on%20Exchange%20account%20via%20EWS%20or%20powershell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-752745%22%20slang%3D%22en-US%22%3EDo%20you%20think%20this%20will%20work%20to%20get%20the%20publish%20URL%20for%20an%20office%20365%20group%20calendar%3F%20Too%20swamped%20to%20test%20myself%20at%20the%20moment%20but%20with%20our%20MS%20Teams%20push%20we%20are%20failing%20because%20we%20cannot%20share%20the%20Teams%20calendar%20with%20our%20Teams%20guests.%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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-cale... . 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

 

 

 

 

4 Replies
Highlighted

PowerShell to the rescue:

 

Set-MailboxCalendarFolder mailbox:\Calendar -PublishEnabled $true

 

And to get the URL:

 

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

 

Highlighted

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.

 

Highlighted

Hi, 

I need to do it too. Did you find a solution ?

 

Rgds,

Highlighted
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.