MAPI CreateFolder function does not return correct values for "PR_RETENTION_FLAG" and "PR_RETENTION_PERIOD" tags
Hi,
I am trying to open an existing subfolder (where retention policies are set) under "Inbox", using the MAPI Createfolder() for copying email messages in Exchange Online. While querying the folder object returned, value for tags like "retention flag" and "retention period" (this happens sometimes) are not returned correctly.
Once the message is copied to the subfolder, the value for retention flag gets reset to 128 (Use parent folder policy) and the retention period tag is removed. So, if the retention policy on the specific folder is set to "1 week delete" etc., it is reset back to "Use parent folder policy".
Can someone please suggest.
Thanks.