Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use MFCMAPI to copy and paste personal retention policy tags from one folder to another #570

Open
Alex-Catalin opened this issue Mar 28, 2023 · 8 comments
Assignees

Comments

@Alex-Catalin
Copy link

A while back I wrote this guide on how to use MFCMAPI to prevent auto archiving for Calendar, Notes and Tasks in Exchange Online - https://answers.microsoft.com/en-us/msoffice/forum/all/prevent-archiving-for-calendar-notes-and-tasks-in/477d93b9-143e-4ace-8c7b-de1bfafc913d.

This is no longer working and I have tested with the following MFCMAPI versions: x64.19.2.19207.938, x64..21.0.21127.03, x64.23.0.23086.06.

The steps to reproduce the issue are:

  • Create a new folder with Outlook desktop client or OWA in the mailbox
  • Assign to this new folder a personal archive tag
  • Run Start-ManagedFolderAssistant to confirm the changes
  • Start MFCMAPI x64.23.0.23086.06, select Tools, Options and make sure you check "use MDB_ONLINE" and "MAPI_NO_CACHE", then click OK
  • Click on Session tab and then logon to select the Outlook profile of the affected mailbox
  • Double click on the name of the Exchange mailbox and expand the Root Container in the new window
  • Expand Top of Information Store and look for the new folder that you created
  • There will be a property stamped on it called PR_ARCHIVE_TAG, right click on it and select Copy
  • Now select the Calendar folder for example, right click on it and select Paste - nothing happens, the PR_ARCHIVE_TAG property is not copied over on the Calendar folder

It's the same behavior as above with version x64..21.0.21127.03. With version x64.19.2.19207.938 however, there are additional things going on:

  • When I right click on the Calendar folder and I select Paste, I get a new window prompt that asks me how do I want to paste the property with the Copy Style field automatically set to IMAPIProp::CopyProps
  • I click OK on the Copy Style prompt and a second windows pops up on which I also click OK
  • The end result is that the PR_ARCHIVE_TAG property is created on the Calendar folder but with a null binary value, which makes it useless, as the expected result is to have the ID of the tag in that binary value
@stephenegriffin
Copy link
Member

Is the problem limited to just the PR_ARCHIVE_TAG or does it reproduce with other properties of type PT_BINARY?

@Alex-Catalin
Copy link
Author

I have not tested other properties because PR_ARCHIVE_TAG is the only one of interest to me.

@Alex-Catalin
Copy link
Author

I tried to copy and paste this property 0x67590102 (PT_BINARY) from one folder to another, and it is the same thing. The property does already exist on the target folder but with another binary value, and I was expecting that copy pasting would at least rewrite the value, but maybe that's not supposed to happen, and it doesn't in this case, the target folder retains its initial binary value for property 0x67590102.

I don't know what other properties I can check, because I don't know their meaning, and it seems that most of the properties already exist on all folders, but they have different binary values.

@stephenegriffin stephenegriffin self-assigned this Jul 31, 2023
@greatquux
Copy link

@Alex-Catalin the link above no longer works.
I'm hoping this can be fixed since I'd also like to prevent archiving of Tasks for a particular user, and this is like the only way to do it.

@Alex-Catalin
Copy link
Author

@Alex-Catalin the link above no longer works. I'm hoping this can be fixed since I'd also like to prevent archiving of Tasks for a particular user, and this is like the only way to do it.

Yeah, I disabled access to that article on purpose because given this MFCMAPI issue, the solution I was discussing in the article no longer applies, unfortunately :).

@greatquux
Copy link

Retention Policy through EWS.pdf
I got a procedure from Microsoft support to use EWS Editor to do this. I threw it into a PDF for safe-keeping. This is not the best place to put this but until Microsoft makes an article about it, I'm putting it here!

@Alex-Catalin
Copy link
Author

Alex-Catalin commented May 22, 2024

@greatquux , I'll see if I can put the info on my forum post. The thing is that in the near future EWS will also go away, and everything will be done with Graph. I will check the file and if that's a good way of tackling this issue, I will add the information on the old thread that I took down. I will give you the credit for the info :). Thanks!

PS: Please let me know if you agree for me to put the info from the pdf file in my old article. I will not do it without your consent.

@Alex-Catalin
Copy link
Author

@greatquux , FIY, I republished the forum post using the EWSEditor method :). Thanks again for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants