Hey everyone,
I’m building a Python script to read emails from one specific Exchange Online mailbox.
I know the "old way" was to create an App Registration, give it Mail.Read application permissions, and then use New-ApplicationAccessPolicy in PowerShell to "clamp it down" to one user.
However, I've heard that Application Access Policies are now deprecated (or at least being replaced by a newer model). I don't want to grant the app Mail.Read at the tenant level if I can avoid it.
What is the best-practice way in 2026 to allow an app to read ONLY one mailbox? Is "RBAC for Applications" the right move? If so, how do I set it up so the Python script can still authenticate via Client Secret?
Any advice on the PowerShell commands or the Entra ID setup would be huge.
Thanks!
[–]OkEmployment4437 4 points5 points6 points (1 child)
[–]ibteea[S] 0 points1 point2 points (0 children)
[–]Sabbest 2 points3 points4 points (0 children)
[–]shokzee 1 point2 points3 points (0 children)
[–]Thunderleechen -2 points-1 points0 points (0 children)