API Permissions

Rising Flight 5,256 Reputation points
2025-08-27T05:41:06.6+00:00

I have the following requirements:

I want to migrate Exchange on-premises mailboxes to Exchange Online using a PowerShell script. I have already achieved this successfully via Task Scheduler on one of my VMs. The script runs every 12 hours, checks for new on-premises mailboxes, and migrates them to Exchange Online.

For authentication, I am using an Azure App Registration since Microsoft will soon enforce MFA. I have uploaded a certificate to the App Registration and I’m using its thumbprint for authentication. Currently, I have assigned Exchange Administrator access to this App Registration, and it is working successfully.

However, I would like to assign only the minimum required API permissions instead of granting full Exchange Administrator access. Could you please guide me on which API permissions are required for this App Registration to migrate users from on-premises to Exchange Online?

For Recipient Management, Distribution List (DL) Management, and Microsoft 365 Group Management, what API permissions are required? Please also guide me on the minimum permissions needed for these scenarios.

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kudos-Ng 3,685 Reputation points Microsoft External Staff Moderator
    2025-08-27T07:19:05.9066667+00:00

    Hi Rising Flight,  

    Thank you for posting your question in the Microsoft Q&A forum and for sharing your setup and requirements.  

    Please correct me if I’m wrong but I understand that you’re currently migrating Exchange on-premises mailboxes to Exchange Online using a PowerShell script, and for authentication, you’re leveraging an Azure App Registration with certificate-based authentication. This is a great approach, especially with Microsoft enforcing MFA soon, as it allows for secure and automated operations. 

    You’ve successfully assigned the Exchange Administrator role to the App Registration, and the migration is working as expected. However, you’re now looking to minimize permissions by assigning only the minimum required API permissions for: 

    • Recipient Management 
    • Distribution List (DL) Management 
    • Microsoft 365 Group Management 

    Based on my research, here are some insights and recommended roles that can help you reduce app access while maintaining functionality: 

    Recipient Management 

    You can assign the Recipient Management role group instead of the full Exchange Administrator role. This role group includes several sub-roles that are relevant to your scenario: 

    • Distribution Groups 
    • Mail Recipient Creation 
    • Mail Recipients 
    • Message Tracking 
    • Migration 
    • Move Mailboxes 
    • Recipient Policies 
    • Reset Password 

    undefined

    This role group should cover most of the operations your script performs related to mailbox migration and recipient handling. 

    Distribution List (DL) Management 

    The Distribution Groups role is specifically designed for managing DLs. However, since this role is already included in the Recipient Management role group, you don’t need to assign it separately if you’ve already assigned Recipient Management. 

    Microsoft 365 Group Management 

    Exchange Online does not natively include roles for managing Microsoft 365 Groups. For this, you can assign the Groups Administrator role in Microsoft Entra ID (formerly Azure AD). This role allows you to: 

    • Create, update, and delete Microsoft 365 groups 
    • Manage group memberships 
    • Perform group-related operations via Graph API or PowerShell  

    These roles should help you minimize app access while still enabling your PowerShell script to function correctly. Of course, depending on the exact operations your script performs, you might be able to scope permissions even further. 

    For more details, please refer to: 

    I hope the resources and information I've provided are useful to you as you work through this setup. 


    If the answer is helpful, please click "Accept Answer" 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. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.