Link to home
Start Free TrialLog in
Avatar of K B
K BFlag for United States of America

asked on

Office 365: Retention Policies: Why would an email show both "expired" and that it will expire tomorrow?

Here is what I am seeing... Any ideas?
It has not been deleted yet which is what the Retention Policy Tag is set to do (after 1-day it permanently deletes)
I made this screenshot tonight on February 27th.  This email was moved from the inbox to a subfolder I created, but it shows the Retention Policy Tag (RPT10_Inbox) that is supposed to be applied to emails only in the inbox:

User generated image
Thank you.
Avatar of Jackie Man
Jackie Man
Flag of Hong Kong image

Have you set Retention Policy Tag for that sub-folder?

Can you post the screen on how did you set your Retention Policy Tag?

What do you see in OWA?
please see below article for info regarding the retention age calculation.

https://technet.microsoft.com/en-us/library/bb430780(v=exchg.160).aspx
The items are moved only after the MFA (re)processes the mailbox, thus they can stay in a "expired" configuration for a while. In the case of O365, it's a 7-day workload cycle!

Usually you can give it a push via Start-ManagedFolderAssistant. You cannot abuse this cmdlet however, as you will get throttled eventually.

If your idea is to delete items every day (judging by the other threads), EWS remains the best option. Here's a detailed post on the subject: http://samspoerle.com/exchange-online-managed-folder-assistant-and-the-7-day-limit/
Avatar of K B

ASKER

Vasil they have chosen to delete every 90 days.  I am just testing with "1-day" to expedite the testing process.

Here is the code I used to create the RPTs and DPT

<#
CSV should look like this:

DefaultFolder
Clutter
DeletedItems
Drafts
Inbox
JunkEmail
Journal
Outbox
SentItems
RssSubscriptions
SyncIssues
ConversationHistory

#>

$TheCSV             = Import-Csv ./defaultfolders.csv
$RetentionPolicy    = "DeleteAllONEDay"
$DefaultPolicyTag   = "DPT_ALL"
$prefix             = "RPT_"
New-RetentionPolicy -name $RetentionPolicy
New-RetentionPolicyTag -Name $DefaultPolicyTag -Type "all" -AgeLimitForRetention 1 -RetentionAction 'PermanentlyDelete' -RetentionEnabled $True
$TagList = (Get-RetentionPolicy $RetentionPolicy).RetentionPolicyTagLinks
$TagList.Add((Get-RetentionPolicyTag $DefaultPolicyTag).DistinguishedName)
Set-RetentionPolicy $RetentionPolicy -RetentionPolicyTagLinks $TagList

foreach ($row in $TheCSV)
    {
    $df      = $row.defaultfolder
    $tag     = $prefix + $df
    New-RetentionPolicyTag -Name $tag -Type $df -AgeLimitForRetention 1 -RetentionAction 'PermanentlyDelete' -RetentionEnabled $True
    $TagList = (Get-RetentionPolicy $RetentionPolicy).RetentionPolicyTagLinks
    $TagList.Add((Get-RetentionPolicyTag $tag).DistinguishedName)
    Set-RetentionPolicy $RetentionPolicy -RetentionPolicyTagLinks $TagList
    }

Open in new window


I planned on having a script run Start-ManagedFolderAssistant -Identity TestUser01 once a day through this testing process (and recommended for production)

Since the request is a bit more "normal", this time (90 days), I was going to suggest Retention Policies.  Thoughts?
Avatar of K B

ASKER

Here is what I see this morning.  I just ran Start-ManagedFolderAssistant this morning (how can I tell if I am being throttled?). I did run it numerous times 6 hours ago but will refrain from running it again today.

User generated image
Avatar of K B

ASKER

Vasil, I read that article and what you are saying makes even more sense now.  So, do i need to use the EWS script if they want retention policies to delete all email older than 90 days?  It seems the main problem they were having was with throttling .. as it was regarding them wanting to delete everyday.
In my case the user wants to delete every email older than 90 days.  will the original script you reference do that in every single folder? Will it ignore calendar, contacts, notes and tasks as this client is requesting?

Are retention policies just not reliable for legal requirements?
ASKER CERTIFIED SOLUTION
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of K B

ASKER

I suppose to bring it back to my original question (and the last image I posted above).... Why do I have an email (that I moved from the inbox) that says "This item is expired" AND it says "Expires 2/28/2017" which is today?


Update: okay I sent an email to the mailbox and then moved it to the subfolder and this is what I see... is this normal?

User generated image
Avatar of K B

ASKER

Okay I need to research why my DPT is not being applied to non default folders.  

User generated image
Avatar of K B

ASKER

Default policy tag (DPT)
Automatically to entire mailbox
A DPT applies to untagged items, which are mailbox items that don’t have a retention tag applied directly or by inheritance from the folder.