r/exchangeserver • • 14h ago

MS KB / Update Exchange Online Admin API apps lose access on 1 December unless you swap permissions. Script to check your tenant

22 Upvotes

Easy one to miss because nothing is being switched off. Microsoft is replacing the permissions for the Exchange Online Admin API (the REST endpoints under /adminapi/v2.0/ that replaced some EWS admin tasks). Deadline is 30 November. From 1 December, anything still only holding the old permission gets refused. Source is MC1540345.

What to swap (both on Office 365 Exchange Online):

- Delegated: Exchange.ManageV2 becomes Exchange.AdminAPI.Manage
- App-only: Exchange.ManageAsAppV2 becomes Exchange.AdminAPI.ManageAsApp

GCC, GCC High and DoD have until 1 January.

What isn't affected: Connect-ExchangeOnline with a certificate uses Exchange.ManageAsApp (no V2). Different permission, leave it alone. Graph permissions like Mail.Read aren't affected either.

Likeliest culprits are room booking and calendar delegation tools that moved off EWS, since the API covers folder permissions, Send on Behalf, distribution group membership and org config.

Read-only script to find them:

Connect-MgGraph -Scopes "Application.Read.All", "DelegatedPermissionGrant.Read.All"
$exo = Get-MgServicePrincipal -Filter "appId eq '00000002-0000-0ff1-ce00-000000000000'"

# App-only
$old = $exo.AppRoles | Where-Object Value -eq "Exchange.ManageAsAppV2"
Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $exo.Id -All |
Where-Object AppRoleId -eq $old.Id | Select-Object PrincipalDisplayName

# Delegated
Get-MgOauth2PermissionGrant -Filter "resourceId eq '$($exo.Id)'" -All |
Where-Object { ($_.Scope -split " ") -contains "Exchange.ManageV2" } |
ForEach-Object { (Get-MgServicePrincipal -ServicePrincipalId $_.ClientId).DisplayName }

Empty output means you're fine. If something shows up: add the new permission, grant admin consent, test, then remove the old one. Your code shouldn't need changing, because the .default scope picks up whatever's been granted. For vendor apps, email them today.

I've written up the full steps with the portal walkthrough. If you want it, ask in the comments.

Anyone found something using this in their tenant yet?


r/exchangeserver • • 11h ago

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

Thumbnail reddit.com
2 Upvotes

r/exchangeserver • • 18h ago

Question Exchange Hybrid: Disabling CMT and routing inbound/outbound mail through a third-party email gateway

6 Upvotes

Hi there,

we're running a hybrid Exchange environment with both Exchange on-premises and Exchange Online mailboxes. We still have a small number of on-premises mailboxes for apps, and our distribution groups are currently managed on-premises and synchronized to Entra ID. The groups are still on-prem because of local applications sending mails to the groups.

Our current mail flow looks roughly like this:

Inbound
Internet → Third-party Email Security Gateway (ESA) → Postfix → Exchange On-Premises → Exchange Online

Outbound
Exchange Online → Exchange On-Premises (Centralized Mail Transport) → Postfix / Email Gateway → Internet

We are considering changing this architecture and reducing our dependency on the on-premises infrastructure, despite the issues last week :D

Our proposed target architecture would be:

Inbound
Internet → Email Security Gateway → Exchange Online

  • Exchange Online mailboxes: delivered directly in EXO
  • On-premises mailboxes: routed through the hybrid connector to on-premises Exchange

Outbound

  • Exchange Online mailboxes → Exchange Online outbound connector → Email Security Gateway → Internet
  • On-premises mailboxes → On-premises Exchange → Postfix / Email Security Gateway → Internet

Is this something one can do and is this even proposed?

- Do inbound messages from the internet get correctly split between EXO and on-premises recipients in this configuration?

- Groups are expaned in Exchange Online and afterwards delivered to recipient in both worlds?

- Are there any pitfalls when routing outbound EXO mail through a third-party gateway instead of on-premises Exchange?

- Do you think this architecture provide an improvement in resilience during on-premises outages?

- Would you recommend this architecture, or is there a good reason to keep CMT enabled in this scenario?

We're particularly interested in real-world experiences, potential drawbacks and things to watch out for.

Thanks!


r/exchangeserver • • 21h ago

Exchange Online Administration - Course

Thumbnail reddit.com
3 Upvotes