Error applying retention policy to specific user's chats

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:



Policy name
Delete Dave's chats
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:
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.

best response confirmed by Rob Helm (Occasional Contributor)
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,