Search code examples
azureoauth-2.0azure-active-directoryauthorization

Can an Enterprise Application on Azure AD be assigned differently scoped permissions?


Our use case is this: our application needs to access the Azure AD of customer organizations to:

  • Authenticate users
  • Sync users' profile data to our app when it changes on AD
  • Read and subscribe to booking changes in meeting rooms

Our app therefore needs the User.Read.All permission to read profiles of users, but also Calendar.Read.All but the latter must be scoped to a specific group (so as the protect the privacy of actual users). According to this article, a tenant administrator can restrict access of an application to a specific group, but I don't see any way to do this for a single permission, so it would restrict all permissions of an enterprise app to this group. Am I missing something or is this simply impossible and I would need to use multiple service accounts for this purpose?


Solution

  • Currently we can not restric the specific application permission to access a specific group. But we can scope application permissions to specific Exchange Online mailboxes.

    Administrators can use ApplicationAccessPolicy cmdlets to control mailbox access of an app that has been granted any of the following application permissions:

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

    So if you have both User.Read.All and Calendar.Read, the ApplicationAccessPolicy will only work for Calendar.Read permission. The ApplicationAccessPolicy are specific to Exchange Online resources and do not apply to other Microsoft Graph workloads.