skip to Main Content

Office 365 – Granting/Revoking Permissions via PowerShell

Office 365 migration and granting permissions via PowerShell

This entry explains how to both grant and revoke permissions in the Office 365 Cloud via PowerShell.

You will need to do the following, in order:-

  • Download (If you havent already ‘Microsoft Online Services Module for Windows PowerShell’)
  • Connect to the Office 365 Cloud
  • Apply the desired permissions

Microsoft Online Services Module for Windows PowerShell

This interface is available through a PowerShell Module available from:-

‘The Microsoft Online Services Sign-In Assistant 7.0’ is a prerequisite for installing the Microsoft Online Services Module for Windows PowerShell, and is available from here:

Connecting to the Office 365 Cloud

Replace my e-mail address with your own (must have correct permissions to connect successfully). A dialog box will ask you to authenticate yourself, enter your password and let PowerShell connect to the Cloud.

Connecting to Office 365 Cloud Mail Server

Applying the Correct Permissions

Full Rights Access

e.g. the process to grant Alex Small full access to Kleo Kleanthous

You must specify the mailbox you want to grant access to first, then then the user second. You must also apply the permissions using the mailbox User Principle Name (UPN), which is

Add-MailboxPermission -User -AccessRights “FullAccess”

After running the above script you will get confirmation displayed like below:-

Granting Permissions Successfully

Note: If you apply full access permissions via PowerShell, the mailbox should appear in the users Outlook automatically (this feature is called Auto-Mapping).

Send As Permission

add-RecipientPermission -AccessRights SendAs -Trustee -Confirm:$False

Send On Behalf Of Permission

Set-Mailbox -Identity -GrantSendOnBehalfTo

Note: If for whatever reason you need to remove permissions from a user, simply replace the ‘Add-Permission’ cmdlet with ‘Remove-Permission’.

Good luck granting and revoking your permissions… 🙂

Share on facebook
Share on linkedin
Share on twitter
Share on email
Hutton Henry
Hutton Henry
I'm a creative business owner, who has interests in technology, screenwriting and what makes people tick. Somehow these disciplines converge to provide a unique perspective on Post-Merger Integration ("PMI"). In my opinion, PMI (and most transformative change) works best when you consider the people aspect first.

Take our FREE Scorecard to find out if your investment is at risk.

Discover the value of technology in your portfolio and target investments to gain more confidence and uncover potentially significant risks that could affect the value of a sale or an acquisition.

More Stories

Back To Top