Connect to Exchange Online through Windows PowerShell with administrator credentials (when it prompts for username and password, your username is your email address for office 365/EXO admins). You can make a PS script to connect to exchange online rather than running them individually).
Notes: PS needs to be able to run scripts, if you get an error trying to run a command, try running this command first to enable execution of commands from PS:
Set-ExecutionPolicy RemoteSigned Then try connecting using below
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get a users mailbox’s current permissions
Once a connection has been established run the following PowerShell command to check users mailbox permission settings:
Get-MailboxPermission -Identity examaple.user1@company.com
(You will see the something similar to below in your PS window showing access rights for users)
Adding access to a another users mailbox
Command:
Add-MailboxPermission -Identity example.user1@company.com -User example.user2@company.com -AccessRights FullAccess
Once added run the get command again to and check for the username of the user you just granted access to in the list to ensure command completed ok. Once confirmed exit the PS session if you’re finished using EXO by running the following command to close your PS session, otherwise you may use up all your PS sessions and have to wait for them to time out.
Remove-PSSession $Session
Removing Mailbox access from a user
Occasionaly there may be a request to remove a users access to another mailbox, so for removing we do something similar to what we did above with remove at the start of the command
1) Remove-MailboxPermission -Identity example.user1@company.com -User example.user2@company.com -AccessRights FullAccess