r/exchangeserver • u/AzureBlog • 1h ago
MS KB / Update Exchange Online Admin API apps lose access on 1 December unless you swap permissions. Script to check your tenant
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?