A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Please note that Q&A forum is a public platform, and moderators will modify the question to hide personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
Based on the current Microsoft documentation, this behavior is most likely caused by the managed identity still having the tenant-wide Microsoft Graph Mail.Send application permission granted in Microsoft Entra ID.
Exchange Online Application RBAC and Microsoft Entra application permissions are separate authorization grants. The Exchange RBAC assignment can be scoped to a mailbox or management scope, but if the same service principal also has an unscoped Mail.Send application permission in Microsoft Entra ID, that permission can still allow the app to send as mailboxes outside the Exchange RBAC scope.
This explains why Test-ServicePrincipalAuthorization returns InScope`` ``=`` ``False for TestUser01, while Microsoft Graph Send-MgUserMail or Invoke-MgGraphRequest still succeeds. The test validates the Exchange RBAC assignment, but the Graph call can still be authorized through the unscoped Microsoft Entra Mail.Send permission.
To validate this, I would recommend checking whether the service principal still has Microsoft Graph Mail.Send application permission granted in Microsoft Entra ID. If the goal is to rely on Exchange Online Application RBAC for mailbox-scoped access, remove the tenant-wide Entra Mail.Send grant and keep the scoped Exchange Online Application`` ``Mail.Send role assignment.
If the behavior continues after removing the unscoped Entra Mail.Send permission and allowing configuration/token changes to take effect, then it would be reasonable to open a Microsoft Support case through M365 Admin Center with the following evidence:
- Managed identity App ID and Object ID
-
Get-ManagementRoleAssignmentoutput -
Get-ManagementScopeoutput -
Test-ServicePrincipalAuthorizationresult for both the allowed mailbox and blocked mailbox - Current Graph API permissions granted to the service principal
- The exact Graph request URI used for
/users/{sender}/sendMail - The result showing that the blocked mailbox can still send successfully
Thank you for your patience.
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.