How to Addmailbox permission to serviceprinciple available in the Azure active directory service principal.

Reddy Chanda, Dinesh 0 Reputation points
2023-10-09T20:30:47.54+00:00

Hi Team,

How to Addmailbox permission to serviceprinciple available in the active directory, i tried with below command but still unable to do it. The error it says that Add-MailboxPermission is not recognized command and i have installed the all the modules related to the microsoft exchange online but still unable to do it.

Add-MailboxPermission-Identity "

Microsoft Exchange Online
{count} votes

1 answer

Sort by: Most helpful
  1. Aholic Liang-MSFT 13,856 Reputation points Microsoft Vendor
    2023-10-11T06:35:40.1366667+00:00

    Hi @Reddy Chanda, Dinesh,

    Add-MailboxPermission - Identity "mymailid@gmail.com" -User "<appid of the application>" -AccessRights FullAccess User's image

    The Add-MailboxPermission command is not recognized as a cmdlet, except that connect-exchangeonline needs to be run to connect to exchange online powershell module.

    You also need to check that the account currently used to connect to the module has at least the Mail Recipient role.

    You can check all roles of the user by referring to the following command:

    Get-ManagementRoleAssignment -RoleAssignee <UserIdentity> -Delegating $false | Format-Table -Auto Role,RoleAssigneeName,RoleAssigneeType
    

    -Identity "mymailid@gmail.com"

    Please note that the - Identity parameter of the Exchange PowerShell command supports user mailboxes, shared mailboxes, resource mailboxes, and so on in the Exchange environment.

     


Your answer

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