Symptoms

A Parallels Operations Automation (POA) task to create or update an Exchange Public Folder fails with the error message 'Public folder user "" doesn't exist. A valid public folder user should be a mail-enabled user, mailbox, or distribution group.'

For example:

Exception calling "Execute" with "3" argument(s):
"Public folder user "<USERNAME>" doesn't exist. A valid public folder user should be a mail-enabled user, mailbox, or distribution group."". Exchange 2010.
Last execution output  Destination host 'MBX10.hosting.local' (#178), IP '192.168.1.101' : Provisioning request failed. Unknown error 0x80131500
[<response><errorContext description="Item referred by 'LDAP://CN=<USERNAME>,CN=Users,DC=hosting,DC=local' does not have a valid legacyExchangeDN" code="0x80131500" executeSeqNo="4">
<errorSource namespace="Exchange2007ProviderEx" procedure="UpdateFolderPermissions"/><errorSource namespace="SW Managed Exchange" procedure="ModifyFolder"/></errorContext></response>] *Exchange2007. 

Cause

The user mentioned in the error message is not a mail-enabled one, does not exist, or does not have the "legacyExchangeDN" attribute filled in their Active Directory account. Microsoft Exchange requires that a public folder user should be a mail-enabled user, mailbox, or distribution group.

You can check if an Active Directory user has the LegacyExchangeDN attribute filled using adsiedit.msc - right click on the user and select 'Properties':

You can also use the ldifde.exe utility to export Active Directory user properties in a text file and check if the legacyExchangeDN attribute is present:

   > ldifde -f userprop.ldf -d "CN=<USERNAME>,CN=Users,DC=hosting,DC=local"

If the user cannot be found, it was probably removed from Active Directory. In this case, proceed to the "Revoke Public Folders" section of the Resolution (below).

Resolution

Create an Exchange mailbox for the user mentioned in the error message, using native Exchange tools like EMS (Exchange Management Shell) or EMC (Exchange Management Console).

Revoke Public Folders

If the user is absent in Active Directory, you can try to revoke the public folder permission through Exchange Management Shell cmdlets:

> Get-PublicFolder -Identity "\<PF_LOCATION>" -recurse | Get-PublicFolderClientPermission | Where-Object {$_.User -like "NT User:<USER'S_SID>"} | Remove-PublicFolderClientPermission -Confirm:$false

Internal content