Skip to content
Sponsor
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Exchange application access policies must be configured

MT.1058MediumEntra IDApp consent and permissions

Part of Maester · Entra ID · App consent and permissions · All checks

Run this check
Invoke-Maester -TestId MT.1058

This check evaluates legacy application access policies in Exchange Online for applications with Microsoft Graph mail permissions.

These permissions grant access to every mailbox unless an application access policy restricts them.

Microsoft Exchange related permissions that should be secured by application access policies include:

  • Mail.Read
  • Mail.ReadBasic
  • Mail.ReadBasic.All
  • Mail.ReadWrite
  • Mail.Send
  • MailboxSettings.Read
  • MailboxSettings.ReadWrite
  • Calendars.Read
  • Calendars.ReadWrite
  • Contacts.Read
  • Contacts.ReadWrite

This check requires a RestrictAccess policy for each application. A DenyAccess policy only denies access to mailboxes in its scope; it does not restrict access to mailboxes outside that scope and does not satisfy this check.

Microsoft has replaced application access policies with RBAC for Applications and advises against creating new application access policies.

  1. For an app still using legacy policies, review its existing policies and confirm a matching RestrictAccess policy limits it to the intended mailboxes. A deny-only policy does not provide that limit.
  2. For new configurations or migration, follow Microsoft’s RBAC for Applications guide to assign the required Exchange application role with a mailbox scope.
  3. Remove equivalent or broader Microsoft Graph application permissions from the app’s Entra grants after migration. Entra and Exchange grants are additive; retaining an unscoped Entra grant defeats the Exchange scope. See MT.1252 for overlapping grants.
  4. Verify the app against both an intended mailbox and a mailbox outside its scope. Test-ServicePrincipalAuthorization evaluates the Exchange RBAC assignment; it does not include separate Entra grants.

MT.1058 does not evaluate RBAC assignments. An app whose mail permissions are granted only through Exchange RBAC is outside this check’s scope.

For existing application access policies, inspect and test the policy configuration with:

Connect-ExchangeOnline
Get-ApplicationAccessPolicy
Test-ApplicationAccessPolicy -Identity [email protected] -AppId '<your-app-id>'
Every attribute of this check
FieldValue
Test IDMT.1058
SeverityMedium
SuiteMaester
ProductEntra ID
Related productsExchange Online
FeatureApp consent and permissions
AreaApplications and workload identities
Resource typeServicePrincipal
User impactLow
Implementation costMedium
MITRE ATT&CKT1114.002 Remote Email Collection
Supports controlsnist-800-53-r5:AC-6, nist-800-53-r5:AC-3
PowerShell testTest-MtSpExchangeAppAccessPolicy
ServicesGraph, ExchangeOnline
Long runningYes