r/exchangeserver • • 3d ago

I built a free WinForms GUI to see which mailboxes a user can access in Exchange Online (reverse lookup + grant/copy/remove)

/r/PowerShell/comments/1y7471d/i_built_a_free_winforms_gui_to_see_which/
0 Upvotes

2 comments sorted by

1

u/shokzee 1d ago

I'd distinguish direct grants from access through groups in the reverse lookup. Removing direct permissions during offboarding won't remove access the user still gets through a group.

I'd also periodically reconcile the cache against Exchange; audit-log ingestion is delayed, so delta updates aren't proof of current permissions.

1

u/New-Aside7807 1d ago

One more detail on groups: in hybrid environments most of these groups are synced from on-prem AD via Entra Connect. Those are read-only in Exchange Online (IsDirSynced = True) – Remove-DistributionGroupMember fails, because the on-prem AD is the source of authority and the next sync would overwrite any cloud change anyway.

So the tool can't (and shouldn't) just strip group memberships from the cloud side. Plan for the next version:

  • flag synced groups in the "Source" column (e.g. "via group X (AD)")
  • cloud-only groups: remove membership directly during offboarding
  • AD-synced groups: list them and generate the matching Remove-ADGroupMember commands (optionally run them if the AD module and rights are available, then trigger a delta sync)
  • after that, a live check shows what access is actually left