question

ashraful20s avatar image
0 Votes"
ashraful20s asked LucasLiu-MSFT commented

How to extract List of all Users Who Have Full Access, Send As and Send on Behalf to Other Exchange Mailboxes.

Hi Experts,

I need the script :

How to extract List of all Users Who Have Full Access, Send As and Send on Behalf to Other Exchange Mailboxes.

It is Okay, if there is separate command for these access.

Thank you.

office-exchange-server-administrationoffice-exchange-server-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LucasLiu-MSFT avatar image
0 Votes"
LucasLiu-MSFT answered LucasLiu-MSFT commented

Hi @ashraful20s ,
According to my research, we cannot directly obtain the permissions of the user's mailbox to other mailboxes.We can know whether each user mailbox contains the "Full Access", "Send As" and "Send on Behalf" permissions of other mailboxes through the permissions assigned to other users on each user's mailbox.

We could run the following script to get the permission between user mailbox:

Full Access:

 $mailboxes = Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"')
    
 foreach ($mailbox in $mailboxes) 
 { Get-MailboxPermission -Identity $mailbox.alias -ResultSize Unlimited | ?{($_.IsInherited -eq $false) -and ($_.User -ne "NT AUTHORITY\SELF") -and ($_.AccessRights -like "FullAccess")} | select Identity, User, AccessRights }

Send As:

 $mailboxes = Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"')
    
 foreach ($mailbox in $mailboxes) 
 { Get-ADPermission -Identity $mailbox.alias | ? { $_.ExtendedRights -like "*send*" -and -not ($_.User -match "NT AUTHORITY") -and ($_.IsInherited -eq $false)} | select Identity,User,ExtendedRights }

Send On Behalf:

 Get-Mailbox -ResultSize Unlimited -Filter ('RecipientTypeDetails -eq "UserMailbox"') | select Alias, GrantSendOnBehalfTo

The following screenshots in the test in lab environment:
Full Access:
95116-image.png

Send As:
95094-image.png

Send On Behalf:
95141-image.png



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.






image.png (34.1 KiB)
image.png (31.1 KiB)
image.png (19.0 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ashraful20s ,
I am writing here to confirm with you how thing going now?



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·

Hi @ashraful20s ,
I am writing here to confirm with you how thing going now?



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·