public:providing_limited_mailbox_access_to_an_entra_application

This is an old revision of the document!


Providing limited mailbox access to an entra application

If you give an Entra application Graph API access such ass Mail.Read, they will get that access to all mailboxes. This is usually too broad. You can also grant such accesses with a more limited scope. The below assumes you already have set up an app registration in Entra.

First, define an Administrative Unit in Entra, and add the mailboxes that should be accessible to it.

Then, define your app registration in Exchange with Exchange-PowerShell:

New-ServicePrincipal -AppId 978FFBA1-6F38-411C-BAD3-15B3DEC24D0E -ObjectId 5746492D-52FF-4501-8DF3-E7814C5491FA -DisplayName "Credit Insurance AI Summary Tool"

Note that the ObjectID must be the ObjectID displayed in the “Managed Application” in Entra. It differs from the ObjectID from the app registration.

Then, also using Exchange Powershell, bind together the service principal, the administrative unit, and a permission:

New-ManagementRoleAssignment -App 978FFBA1-6F38-411C-BAD3-15B3DEC24D0E -Role "Application Mail.Read" -RecipientAdministrativeUnitScope 9D3540C0-420A-48A9-8C72-BEE226F6C920

In this example, we're giving Mail.Read access to this application.

Finally, you can check any such management roles with this command. Your new role should be displayed:

Get-ManagementRoleAssignment -RoleAssigneeType ServicePrincipal
public/providing_limited_mailbox_access_to_an_entra_application.1793884882.txt.gz · Last modified: by thomas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki