Menu Title

Grant Mailbox Access Permission to Microsoft365 Mailbox

To grant full access to an Microsoft 365 Mailbox you must first connect to the remote PowerShell, and provide MailboxPermission.

PS C:\WINDOWS\system32> Import-Module MSOnline

For admin accounts without multifactor authentication, use the Get-Credential method.

### create credential object and specify admin credentials

PS C:\WINDOWS\system32> $Credential = Get-Credential

### build session

PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic –AllowRedirection

HostGator $2.75 per month
HostGator
24/7/365 Technical Support, Free Site Building Tools, 4500 Website Templates, Free Shopping Cart Software, Ideal for WordPress, 45 Day Money Back Guarantee

### import into PowerShell session

All in One WordPress Hosting Starts at 30$ per month
All in One WordPress Hosting
WordPress
High optimized WordPress hosting, secure firewall, HTTPS, Backup, hack-fix guarantee and many others at 30$ per month

PS C:\WINDOWS\system32> Import-PSSession $Session

### user.x is the mailbox that you want grant access to user.y

PS C:\WINDOWS\system32> Add-MailboxPermission –Identity “user.x@abc.com” –User “user.y@abc.com” –AccessRights FullAccess

Identity -  user or shared mailbox to be given permission
User - User that will get permission
AccessRights - permissions either FullAccess, SendAs ...etc

Note: If incase you experience script execution error with Import-PSSession, then follow our article for a solution - Error while importing PSSession on Microsoft365

Related Post