Mailbox does not share with users's email - Exchange Online Powershell

Abhishek Goyal 241 Reputation points

My situation is - I have created a user on Azure AD with UPN "" and its email is "". Then, create one more user with UPN "" and assign it an exchange license.

After that, I want to share its mailbox with the user with UPN "". The command that I use:

Add-MailboxPermission -Identity -User -AccessRights FullAccess -InheritanceType All

According to Microsoft docs, the possible value that I can provide with -User attributes are:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Domain\Username
  • Email address
  • GUID
  • LegacyExchangeDN
  • SamAccountName
  • User ID or user principal name (UPN)

So, according to that possible values the mailbox has to be shared with the user's email address.

My Output,

If email address is same as UPN then it shared successfully.

If email address is different with UPN then it give error-


Please help me with it.

Microsoft Exchange Online
0 comments No comments
{count} votes

Accepted answer
  1. Yuki Sun-MSFT 34,576 Reputation points

    Hi @Abhishek Goyal ,

    I have created a user on Azure AD with UPN "" and its email is "".

    Is the "Email" property added in Azure AD portal? If so, it could be an expected behavior as this doesn't mean the user is already a real mailbox user. While the Microsoft Doc you shared earlier states that, "You can specify the following types of users or groups (security principals) for this parameter:

    • Mailbox users
    • Mail users
    • Mail-enabled security groups (non-mail-enabled security groups are selectable, but they don't work)"

    Could you have a look at the Microsoft 365 admin center, find this user and click the Mail tab? If the below warning prompt, please assign an Exchange Online license for this user as well so that it can has a real mailbox:User's image

    I just tried testing in my lab tenant by creating a user in Azure AD with UPN "" and Email "", I can replicate the error you met when trying to grant user5 the full access permission to another existent user. However, after adding the Exchange Online license for user5, the same command can be ran successfully: User's image

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 79,136 Reputation points MVP

    What you are describing is indeed a supported scenario, the cmdlet should accept any of the email addresses configured on a given mailbox as input for the -User parameter. However, assigning an Exchange license to the user doesn't necessarily mean that a mailbox will be provisioned, in which case Exchange might not "know" about any additional email addresses. In other words, you need to check whether the given address is a valid "recipient", which is easily done via the Get-Recipient cmdlet.

    1 person found this answer helpful.