Extensibility and Integration
  • 🔌Extensibility and Integration
  • 📦Products
    • Active Directory
      • Microsoft Graph
        • Overview
        • Tutorials
        • How to Guides
          • Create App Registration
          • Limit Permissions to a Specific Mailbox
      • OpenID
        • UPN Transformation
    • Cognitive Services
      • Form Recognizer
        • Overview
        • Tutorials
        • How to Guides
          • Set Up Form Recognizer
      • Anomaly Detector
        • Overview
        • Tutorials
        • How to Guides
    • Database
      • MS SQL Server
        • Overview
        • Tutorial
          • Flow on MS SQL - Basics
          • Flow on MS SQL - Extended
        • How to Guides
          • Query SQL in odd ways
    • ERP
      • Infor M3 Cloud
        • Overview
        • Tutorials
        • How to Guides
      • IFS Cloud
        • Overview
        • Tutorials
        • How to Guides
          • Import Application Configuration Packages
          • Add a new projection to the connector
          • Add a new server to the connector
      • IFS App 10
        • Overview
        • Tutorials
        • How to Guides
          • Import Application Configuration Packages
    • Storage
      • Azure Storage Account
        • Overview
        • Tutorials
        • How to Guides
          • Set Up Azure Storage Account
    • Studio
      • Applications
        • Workflow
          • Overview
          • Tutorials
          • How to Guides
            • Create Global Properties
            • Import Workflows
            • Setting Menu Roles
            • Publishing Workflows
            • Bluetooth Low Energy Quick Start Guide
      • Environment
        • Import Flow Properties
      • Connectors
        • Database
          • IFS Apps 10
            • Overview
            • Tutorials
            • How To Guides
              • Configure IFS Apps 10 Connector
        • Email
          • How to Guides
            • Email Example
        • File System
          • How to Guides
            • File System Example
            • Importing data from flat files (or other sources)
              • Scheduled Flows
        • HTML to PDF
          • How to Guides
            • HTML to PDF Example
        • Table Operation
          • How To Guides
            • Table Operations Example
        • REST Connector
          • How To Guides
            • Import a REST Configuration
            • Authenticate
              • OAUTH2
              • Cookie
          • Known Issues
            • HTTP Method: Delete - with body - not supported
            • HTTP Method: POST- Header parameters are not passed if no Body is sent
          • Tutorial
            • REST Basic training using Flow and Postman
        • OPC UA Client
          • How to Guides
            • Configure OPC UA Client Connector
        • OData Connector
        • OData Connector
    • Portal 2
      • Portlet
        • Basic
          • Data Tree
            • Overview
            • Tutorial
            • How to Guides
        • Visual Planning
          • Scheduler
            • Overview
            • Tutorial
              • Configure Scheduler
            • How to Guides
      • How To Guides
        • Start browser and auto login
    • Clients
      • Mobile Clients
        • Preference file
  • 📚Resources
    • Flow Help
    • Flow Forum
Powered by GitBook
On this page
  • Limit Permissions to a Specific Mailbox
  • Create a New Mail-Enabled Security Group
  • Create an Application Access Policy

Was this helpful?

  1. Products
  2. Active Directory
  3. Microsoft Graph
  4. How to Guides

Limit Permissions to a Specific Mailbox

This document describes how to limit the permissions for an App Registration to a specific mailbox or a set of mailboxes.

PreviousCreate App RegistrationNextOpenID

Last updated 3 years ago

Was this helpful?

Limit Permissions to a Specific Mailbox

When you have created an App Registration with Mail.ReadWrite permissions it is possible to read all mailboxes in the directory. Follow these instructions to limit the access to mailboxes in a specific security group.

For more information about limiting the permissions to a specific mailbox, read more at

Create a New Mail-Enabled Security Group

You can use an existing security group for your mailbox if you already have one that matches your needs. Continue with in that case.

  • Navigate to Exchange Admin Center,

  • Create a new mail-enabled security group

  • Select "Mail-enabled security" for the group type

  • Enter a name for the group

  • Enter an email address

  • Save the new group

  • Add one or members to the new group by clicking on the Group Name and select Members in the panel to the right

  • Add the member and save

Create an Application Access Policy

Follow these steps to connect your App Registration with the Mail-enabled Security Group by using Exchange Online PowerShell.

  • Execute the following statements in PowerShell console

  • First import the EchangeOnlineManagement module

Import-Module ExchangeOnlineManagement
  • Connect to EchangeOnlineManagement

Connect-ExchangeOnline -UserPrincipalName admin-user@flowington.com
  • Create the new access policy by connecting your Application ID your Security Group

New-ApplicationAccessPolicy -AppId B1A82AD6-34A8-4546-8BBD-A4B79625C74F -PolicyScopeGroupId flow-mailboxes@flowington.com -AccessRight RestrictAccess -Description "Restrict this app to members of distribution group Flow-Mailboxes."
  • Test your new policy with an email address that is a member of the group and one that's not

Test-ApplicationAccessPolicy -Identity daisy@flowington.com -AppId B1A82AD6-34A8-4546-8BBD-A4B79625C74F

Sample output of an access policy test:

PS /Users/anbese> Test-ApplicationAccessPolicy -Identity daisy@flowington.com -AppId 0dba3db1-xxxx

RunspaceId        : -
AppId             : -
Mailbox           : Daisy
MailboxId         : -
MailboxSid        : -
AccessCheckResult : Granted


PS /Users/anbese> Test-ApplicationAccessPolicy -Identity lily@flowington.com -AppId 0dba3db1-xxxx

RunspaceId        : -
AppId             : -
Mailbox           : lily
MailboxId         : -
MailboxSid        : -
AccessCheckResult : Denied
  • Disconnect from Exchange Online PowerShell

Disconnect-ExchangeOnline

If you haven't used Exchange Online PowerShell before you need to set up your PowerShell environment first. Follow the instructions at

📦
Install and maintain the EXO V2 module
https://docs.microsoft.com/en-us/graph/auth-limit-mailbox-access
https://admin.exchange.microsoft.com
Create an Application Access Policy