Handle share folder invitation mails
Hi, I've tried to figure this out for a couple of weeks now but apparently I am stuck. At our office we are using a central shared calendar to book rooms and share other events (weird I know).
Everyone gets an invite by mail containing an xml file containing information of the calendar. In Outlook, this xml file is not shown as an attachment but as a button to accept the calendar invite (see https://support.microsoft.com/en-us/help/10106/how-to-open-a-shared-calendar-from-an-outlook-sharing-invitation).
The xml contains the following data:
<SharingMessage> <DataType>calendar</DataType> <Initiator> <Name>----</Name> <SmtpAddress>----</SmtpAddress> <EntryId> 00000000DCA740C8C042101AB4B908002B2FE18201000000000000002F6F3D5455204B6169736572736C61757465726E2F6F753D45786368616E67652041646D696E6973747261746976652047726F7570202846594449424F484632335350444C54292F636E3D526563697069656E74732F636E3D64656D75746800 </EntryId> </Initiator> <Invitation> <Title>Besprechungsraum</Title> <Providers> <Provider Type="ms-exchange-internal" TargetRecipients="----"> <FolderId> 0000000068050D621E0114419C12A170D02B859F010060A2C410DC86B34989AA0F0F94179EFF00000900700A0000 </FolderId> <MailboxId> 0000000038A1BB1005E5101AA1BB08002B2A56C20000454D534D44422E444C4C00000000000000001B55FA20AA6611CD9BC800AA002FC45A0C0000006175746F646973636F7665722E756E692D6B6C2E6465002F6F3D5455204B6169736572736C61757465726E2F6F753D45786368616E67652041646D696E6973747261746976652047726F7570202846594449424F484632335350444C54292F636E3D526563697069656E74732F636E3D64656D75746800 </MailboxId> </Provider> </Providers> </Invitation> </SharingMessage>
So I thought the Ids provided were base64 encoded and tried decoding them, but this did not work. I tried passing the FolderId into the "Subscribe to folder of other EWS user..." folder name box in the dialog after choosing the corresponding user in the same dialog. However, this did not work either. Opening up the calendar of the user who sent me the invitation and checking the "Include subfolders" box did not work because I have no rights to access the base calendar of the user. I was also looking up the xml data in https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.folderid?view=exchange-ews-api but wasn't able to find a solution or further hints.
I appreciate your help.