r/PowerShell • u/New-Aside7807 • 4d ago
Script Sharing I built a free WinForms GUI to see which mailboxes a user can access in Exchange Online (reverse lookup + grant/copy/remove)
Hi r/PowerShell,
one thing that always annoyed me as an M365 admin: the Exchange Admin Center only shows permissions per mailbox. There is no quick way to answer "Which mailboxes, calendars and room mailboxes does user X have access to?" – especially during onboarding/offboarding or when someone changes departments.
So I built MailboxAccess, a PowerShell/WinForms tool on top of the EXO v3 module.
What it does
- Reverse lookup: enter a user → see all mailboxes they have FullAccess, SendAs, SendOnBehalf or folder/calendar permissions on
- Room mailboxes: includes calendar permissions and booking delegates
- Grant / copy / remove: add rights, copy all rights from one user to another (onboarding), or remove everything (offboarding)
- Mailbox view: who has access to a specific mailbox
- Tenant report: overview of all non-default permissions
- Fast: results come from a local cache (seconds instead of minutes). The cache can be refreshed incrementally via the Unified Audit Log (delta update), so you don't have to rebuild it every time
- Runs locally, no server, no cloud service, data stays in `%LOCALAPPDATA%`
Requirements
- Windows PowerShell 5.1
- `ExchangeOnlineManagement` module
- Exchange admin rights (plus "View-Only Audit Logs" for the delta update)
Download
GitHub: https://github.com/RazeAttack/MailboxExchangeGUI
You can run the `.ps1` directly or use the EXE from the releases (built via GitHub Actions, SHA256 checksums included). The EXE is a ps2exe build and not code-signed yet (code signing via SignPath is in progress), so Defender/SmartScreen may complain – if you prefer, just run the script.
MIT licensed, free. Feedback, issues and PRs are very welcome – especially on performance in larger tenants (I've tested it with ~350 mailboxes).
Screenshots are in the README (tenant data redacted).
4
u/dragery 4d ago
Was hoping for some magic that didn't require caching all mailboxes permissions. Darn.
3
u/journeypiggyman 2d ago
Why does OP sound like AI hmmm
2
u/Randalldeflagg 2d ago
Have you considered setting up an entra app and granting it to access to the graph apis? Then it could just run continuously in the background as a service that you can launch and query from a PAM.
That has always been one of my annoyance with 365. Tons of data and meterics are available to you if you know where to look. We currently pay for Admin Droid to do a lot of our heavy lifting for reporting. But the new powers in charge don't see the benefits of it. So Ive been working on replacing the reporting we currently get.
1
u/7amitsingh7 1d ago
This solves a common pain point for exchange admins. especially useful during onboarding and offboarding when tracking mailbox permissions can become time-consuming.
1
u/omglazrgunpewpew 1d ago
Possible edge case for larger tenants. In
Get-AuditChangedMailboxes, theResultIndex >= ResultCountcheck runs before the 50K record guard. If both are true on the same page, the loop exits withTruncatedstill false, andUpdate-CacheDeltaadvancesLastDelta. Would it make sense to split and retry the time window whenever it hits the cap, then advanceLastDeltaonce the whole window has been processed? Spotted this in the source, haven't repro'd against a tenant.-3
u/dabbuz 4d ago
why is psexe in there ????, this is like 20 year old method, good effort but seems like junk code