Application Impersonation

Roger Roger 6,691 Reputation points
2025-01-24T21:24:46.9766667+00:00

Hi All,

I have received an email from Microsoft stating that the Application Impersonation RBAC role in Exchange Online will be retired in February. I want to identify which applications in my tenant are using this role. Will the script below fetch all the applications utilizing the Application Impersonation RBAC role in my tenant, or is there another script I can use to achieve this? Please guide me.

https://github.com/cparker-msft/appImpersonationUsersReport/

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,702 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,207 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Kavya 315 Reputation points
    2025-01-25T02:35:17.99+00:00

    To find apps having application impersonation role in your tenant, run the below cmdlet.

    Connect-ExchangeOnline
    Get-ManagementRoleAssignment -Role ApplicationImpersonation –GetEffectiveUsers
    

    After identifying those apps, consider migrating applications to Microsoft Graph to access Exchange Online data.

    0 comments No comments

  2. Alex Zhang-MSFT 3,940 Reputation points Microsoft Vendor
    2025-01-27T02:21:12.51+00:00

    Hello, @Roger Roger,

    Welcome to the Microsoft Q&A platform!

    To identify which applications in your tenant are using the Application Impersonation RBAC role in Exchange Online, you can use the script provided in the GitHub repository you mentioned. The script is specifically designed to help identify users and applications with the Application Impersonation role assigned.

    Here’s a more detailed example of the steps using PowerShell:

    # Connect to Exchange Online 
    Connect-ExchangeOnline -UserPrincipalName your_admin_account@domain.com 
    
    # Get all users with the ApplicationImpersonation role assigned 
    $impersonationRoleAssignments = Get-ManagementRoleAssignment -Role ApplicationImpersonation 
    
    # Output or save the relevant information 
    $impersonationRoleAssignments | Select-Object RoleAssigneeName, RoleAssigneeType | Export-Csv -Path "C:\Path\ImpersonationRoleAssignments.csv" -NoTypeInformation
    

    Test results:User's image

    Make sure you have the necessary permissions and prerequisites before running these scripts, and test in a safe environment if possible.

    Should you need more help on this, you can feel free to post back. 


    If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang

    0 comments No comments

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.