Share via

Why Remove-MailboxFolderPermission fails if user specified in User property doesn't have any mailbox?

Volodymyr Dumchykov 56 Reputation points
2023-09-20T07:31:27.8066667+00:00

ExoModuleVersion: 3.2.0

Problem:  Remove-MailboxFolderPermission cannot remove permission if the user specified in User property doesn't have any Exchange Online mailbox. The cmdlet fails with the following error: 

|Microsoft.Exchange.Management.StoreTasks.UserNotFoundInPermissionEntryException|There is no existing permission entry found for user:103ac2ac-42e3-4797-af94-bd13d4c69a9c.

Where '103ac2ac-42e3-4797-af94-bd13d4c69a9c' is the ID of the user that I specify in -User parameter.

If I specify the user's display name, then the cmdlet removes the permission correctly, but display name cannot be used because it is not unique and cannot identify the user correctly.

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

Windows for business | Windows Server | User experience | PowerShell

Answer accepted by question author

  1. Vasil Michev 126.1K Reputation points MVP Volunteer Moderator
    2023-09-20T17:40:20.5266667+00:00

    Can you show us the output of Get-MailboxFolderPermission for that entry? In particular, the properties of the User object, for example:

    Get-MailboxFolderPermission user:\calendar | Select -ExpandProperty User

    If the UserType value returned therein does not show "Internal", Exchange has no knowledge of the corresponding security principal, and using the GUID value will result in an error similar to the above.

    If you do see non-null RecipientPrincipal object returned, you can use identifiers therein to reference the user.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.