Commands › Exchange Online

Add-MailboxPermission

Exchange Online ExchangeOnlineManagement Add-*

Add permissions to a mailbox or to an Exchange Server 2016, Exchange Server 2019, or Exchange Online mail user.

Quick start script

# Add-MailboxPermission — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Add-MailboxPermission -Identity <MailboxIdParameter> -AccessRights <MailboxRights[]> -Instance <MailboxAcePresentationObject> | Format-List

# 3. Export for evidence / drift tracking
Add-MailboxPermission | Export-Clixml .\MailboxPermission-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

AccessRights

Add-MailboxPermission [-Identity] <MailboxIdParameter> -AccessRights <MailboxRights[]> -User <SecurityPrincipalIdParameter>
 [-AutoMapping <Boolean>]
 [-Confirm]
 [-Deny]
 [-DomainController <Fqdn>]
 [-GroupMailbox]
 [-IgnoreDefaultScope]
 [-InheritanceType <ActiveDirectorySecurityInheritance>]
 [-WhatIf]
 [<CommonParameters>]

Owner

Add-MailboxPermission [-Identity] <MailboxIdParameter> -Owner <SecurityPrincipalIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-GroupMailbox]
 [-IgnoreDefaultScope]
 [-WhatIf]
 [<CommonParameters>]

Instance

Add-MailboxPermission [[-Identity] <MailboxIdParameter>] -Instance <MailboxAcePresentationObject>
 [-AccessRights <MailboxRights[]>]
 [-User <SecurityPrincipalIdParameter>]
 [-AutoMapping <Boolean>]
 [-Confirm]
 [-Deny]
 [-DomainController <Fqdn>]
 [-GroupMailbox]
 [-IgnoreDefaultScope]
 [-InheritanceType <ActiveDirectorySecurityInheritance>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox where you want to assign permissions to the user. You can use any value that uniquely identifies the mailbox. For example:
-AccessRights MailboxRights[] yes The AccessRights parameter specifies the permission that you want to add for the user on the mailbox. Valid values are:
-Instance MailboxAcePresentationObject yes This parameter is available only in on-premises Exchange.
-Owner SecurityPrincipalIdParameter yes The Owner parameter specifies the owner of the mailbox object. You can specify the following types of users or groups (security principals) for this parameter:
-User SecurityPrincipalIdParameter yes The User parameter specifies who gets the permissions on the mailbox. You can specify the following types of users or groups (security principals) for this parameter:
-AutoMapping Boolean The AutoMapping parameter includes or excludes the mailbox from the auto-mapping feature in Microsoft Outlook. Auto-mapping uses Autodiscover to automatically add mailboxes to a user's Outlook profile if the user has...
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Deny SwitchParameter The Deny switch specifies that the permissions you're adding are Deny permissions. You don't need to specify a value with this switch.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-GroupMailbox SwitchParameter This parameter is available only in the cloud-based service.
-IgnoreDefaultScope SwitchParameter The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange PowerShell session, and to use the entire forest as the scope. You don't need to specify a value with this switch.
-InheritanceType ActiveDirectorySecurityInheritance The InheritanceType parameter specifies how permissions are inherited by folders in the mailbox. Valid values are:
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.