SOLVED

Error applying retention policy to specific user's chats

%3CLINGO-SUB%20id%3D%22lingo-sub-2708155%22%20slang%3D%22en-US%22%3EError%20applying%20retention%20policy%20to%20specific%20user's%20chats%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2708155%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20getting%20an%20error%20applying%20retention%20policy%20to%20a%20specific%20user's%20Teams%20chats.%20I'd%20appreciate%20any%20help%20fixing%20it.%3C%2FP%3E%3CP%3ESpecifically%2C%20I%20am%20trying%20to%20delete%20all%20chats%20of%20a%20specific%20user%20(let's%20call%20him%20%22Dave%22)%20after%20one%20day.%20When%20I%20try%20to%20apply%20that%20retention%20policy%2C%20I%20receive%20the%20following%20error%20message%3A%3C%2FP%3E%3CP%3E%3CEM%3EThe%20specified%20recipient%20%22Dave%22%20couldn't%20be%20found.%20Reason%3A%20The%20recipient%20Dave%20isn't%20the%20expected%20type.%3C%2FEM%3E%3C%2FP%3E%3CP%3EI%20can%20apply%20the%20same%20policy%20to%20other%20users%20without%20error.%20Dave%20is%20licensed%20for%20Office%20365%20E3.%20The%20only%20unusual%20thing%20I%20can%20think%20of%20for%20Dave%20is%20that%20he%20has%20limited%20administrative%20rights%20(Message%20Center%20Read%2C%20Office%20Apps%20admin).%3C%2FP%3E%3CP%3EFor%20the%20record%2C%20I%20have%20reproduced%20a%20summary%20of%20the%20policy%20below.%3C%2FP%3E%3CP%3EHas%20anyone%20seen%20this%20problem%20before%3F%20Any%20ideas%20what%20I%20should%20try%20next%3F%3C%2FP%3E%3CP%3E(Suggestion%20was%20from%20this%20thread%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-teams%2Fhow-to-permanently-delete-chat-conversation-after-scheduled%2Fm-p%2F1256110%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmicrosoft-teams%2Fhow-to-permanently-delete-chat-conversation-after-scheduled%2Fm-p%2F1256110%3C%2FA%3E)%3C%2FP%3E%3CP%3E%3CSPAN%3ERob%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E-----%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EPolicy%20name%3CBR%20%2F%3EDelete%20Dave's%20chats%3CBR%20%2F%3EDescription%3CBR%20%2F%3EDelete%20Dave's%20chats%20after%20one%20day%3CBR%20%2F%3ELocations%20to%20apply%20the%20policy%3CBR%20%2F%3ETeams%20chats%20(1%20User)%3CBR%20%2F%3ERetention%20settings%3CBR%20%2F%3EDelete%20items%20at%20end%20of%20retention%20period%20%3CBR%20%2F%3EDelete%20items%20that%20are%20older%20than%201%20days%20based%20on%20when%20they%20were%20created%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2708155%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMeetings%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2708376%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20applying%20retention%20policy%20to%20specific%20user's%20chats%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2708376%22%20slang%3D%22en-US%22%3EAdmin%20privileges%20should%20make%20no%20difference.%20Where%20is%20the%20user's%20mailbox%20located%3F%20You%20can%20try%20adding%20him%20to%20the%20policy%20via%20PowerShell%2C%20see%20if%20it%20makes%20a%20difference%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fset-retentioncompliancepolicy%3Fview%3Dexchange-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fexchange%2Fset-retentioncompliancepolicy%3Fview%3Dexchange-ps%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2708408%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20applying%20retention%20policy%20to%20specific%20user's%20chats%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2708408%22%20slang%3D%22en-US%22%3EThanks%2C%20Vasil%2C%20for%20the%20suggestion.%20In%20PowerShell%2C%20I%20tried%20both%20creating%20the%20policy%20from%20scratch%2C%20and%20adding%20Dave%20to%20a%20policy%20I%20created%20interactively.%20I%20both%20cases%2C%20I%20got%20an%20error%20message%20along%20the%20following%20lines%3A%3CBR%20%2F%3EThe%20specified%20recipient%20%22Dave%22%20couldn't%20be%20found.%20Reason%3A%20The%20recipient%20Dave%20isn't%20the%3CBR%20%2F%3Eexpected%20type.%3CBR%20%2F%3EFollowed%20by%20a%20bunch%20of%20details%20specific%20to%20our%20Office%20365%20instance.%3CBR%20%2F%3EThanks%20for%20helping%20out%20here%2C%20I%20really%20appreciate%20it.%3CBR%20%2F%3ERob%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I am getting an error applying retention policy to a specific user's Teams chats. I'd appreciate any help fixing it.

Specifically, I am trying to delete all chats of a specific user (let's call him "Dave") after one day. When I try to apply that retention policy, I receive the following error message:

The specified recipient "Dave" couldn't be found. Reason: The recipient Dave isn't the expected type.

I can apply the same policy to other users without error. Dave is licensed for Office 365 E3. The only unusual thing I can think of for Dave is that he has limited administrative rights (Message Center Read, Office Apps admin).

For the record, I have reproduced a summary of the policy below.

Has anyone seen this problem before? Any ideas what I should try next?

(Suggestion was from this thread: https://techcommunity.microsoft.com/t5/microsoft-teams/how-to-permanently-delete-chat-conversation-a...)

Rob

-----

Policy name
Delete Dave's chats
Description
Delete Dave's chats after one day
Locations to apply the policy
Teams chats (1 User)
Retention settings
Delete items at end of retention period​
Delete items that are older than 1 days based on when they were created

4 Replies
Admin privileges should make no difference. Where is the user's mailbox located? You can try adding him to the policy via PowerShell, see if it makes a difference: https://docs.microsoft.com/en-us/powershell/module/exchange/set-retentioncompliancepolicy?view=excha...
Thanks, Vasil, for the suggestion. In PowerShell, I tried both creating the policy from scratch, and adding Dave to a policy I created interactively. I both cases, I got an error message along the following lines:
The specified recipient "Dave" couldn't be found. Reason: The recipient Dave isn't the
expected type.
Followed by a bunch of details specific to our Office 365 instance.
Thanks for helping out here, I really appreciate it.
Rob

best response confirmed by Rob Helm (Occasional Contributor)
Solution
So again, what's the deal with his mailbox? And which identifier are you specifying when trying to add him, try the ExternalDirectoryObjectId.

@Vasil Michev Good suggestion! It allowed me to find a workaround in PowerShell.

The ExternalDirectoryObjectId, like the e-mail address, returned "not found", although the error message was different:

Could not find recipient [Dave's ExternalDirectoryObjectId]. If newly created please retry the operation after sometime. If deleted or expired please reset with valid values and try again.

But I tried the same operation with Dave's personal name (not e-mail address) and with that, it worked.

Clearly, there is something odd about this specific mailbox, but we can get around the problem for now.

Thanks again for your help,

Rob