Share via

Share mailbox

Handian Sudianto 7,241 Reputation points
2024-01-29T14:31:36.9366667+00:00

Hello, Can we make an script to query who can access to the specific share mailbox?

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

0 comments No comments

Answer accepted by question author

Kai Yao 37,791 Reputation points Moderator
2024-01-30T02:36:40.7866667+00:00

Hi @Handian Sudianto You can use a script like:

$SharedMailbox = "******@domain.com"

Write-Host("full Access")
Get-EXOMailboxPermission -Identity $SharedMailbox | where { ($_.User -ne "NT AUTHORITY\SELF") -and ($_.IsInherited -eq $false)} | ft identity,user,AccessRights

Write-Host("Send As")
Get-EXORecipientPermission -Identity $SharedMailbox | where { ($_.Trustee -ne "NT AUTHORITY\SELF") -and ($_.IsInherited -eq $false)} | ft identity,Trustee,AccessRights

Write-Host("Send On Behalf")
Get-EXOMailbox -Identity $SharedMailbox -Properties GrantSendOnBehalfTo | ft UserPrincipalName, GrantSendOnBehalfTo

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  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.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.