I'm looking for the program way of retrieving of Outlook email message templates (templates list and template's inside content) in Microsoft 365. I've already spent some time with Microsoft Graph API investigation but can't find any suitable method there. Could anybody advise me the way to solve my task (any not deprecated method/API).
Sorry for so straightforward question but time is already come and I still have no any solution.
The templates are stored as a hidden (associated) message in the Inbox folder in the mailbox. The message class of that message is
"IPM.Configuration.ClientExtension.a216ceed77914635a7525a4ac0a5eb93". You can access it through the Outlook Object ModelI don't think you can access associated folder messages in Graph, but you can in EWS.
As a debugging hint, you can figure out where things are stored using OutlookSpy (I am its author) - click
IMsgStorebutton, go to theAdvisetab, modify the setting (template in your case), look at the notification in OutlookSpy. Select the message entry id, right click, selectIMAPISession::OpenEntry. From there, you can figure out what the parent folder is (PR_PARENT_ENTRYID, right click and selectIMAPISession::OpenEntryto open it) and where the data is stored (PR_ROAMING_DICTIONARY).