Microsoft 365

Microsoft 365: List Send and SendAs Permissions of all Users

This is another blog post about Microsoft 365 and Exchange Online. This time I will dedicate myself to a feature that is Outlook and Exchange related. What I am talking about is granting mailbox Send and SendAs permissions. Do you have an overview of what is going on in your environment and foremost who has granted send or sendas permissons to other users? If not, read on.

Connect to Exchange Online

First of all we need to connect to Exchange Online. Hit the keys and enter the following lines to connect to your tenant.


$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Credential (Get-Credential) -Authentication Basic -AllowRedirection

Import-PSSession $Session -DisableNameChecking

How do you know that worked? You should see a screen that shows exported commands.

Anmerkung 2020-03-28 162618

Retrieve a list of all Send and SendAs Permissions

Type the following code to get a list of all user mailboxes that have send or sendAs rights configured:


Get-Mailbox -ResultSize Unlimited |
Get-RecipientPermission |
Where-Object {$_.Trustee -notlike "*self*"}

Anmerkung 2020-04-06 095630.png

Nice one. As you can see, I have SendAs permissons on hubers mailbox 😉

Hope this was helpful!

See also

Microsoft 365: Show Mailboxes that have Auto-Reply enabled

Microsoft 365: Add User Accounts and Mailboxes with PowerShell

2 replies »

  1. Hi Patrick,

    I have 2 points on your post. First of all you should have a look onto the new Exchange Online Powershell Module V2 (see https://docs.microsoft.com/de-de/powershell/exchange/exchange-online/exchange-online-powershell-v2/exchange-online-powershell-v2?view=exchange-ps). Using the new module will save you some code for connecting to Exchange Online and you are able to use the new commandlets. Another comment: Your code would work in small environments but will fail in bigger environments. Additionally in some cases it might be helpful to check the Send-On-Behalf permissions too.

    Regards,
    Roland

    Liked by 1 person

Leave a Reply to rolandehle Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.