What is the security risk of granting AppRoleAssignments.ReadWrite.All to an automation app that creates groups inside Administrative Units and adding that groups to Enterprise application?

SrVish 20 Reputation points
2025-11-17T10:53:33.6333333+00:00

I have an internal automation application that performs the following tasks in Entra ID:

  1. Creates Azure AD groups inside specific Administrative Units

Makes selected users PIM-eligible for those newly created groups

Assigns the newly created groups to an Enterprise Application (used as an external IdP for AWS)

To enable these operations, the app registration currently has the AppRoleAssignments.ReadWrite.All Graph API permission.

I understand this is a very high-privilege permission, and I want to validate whether my design has unnecessary security exposure.

My questions are:

  • What is the worst-case impact if AppRoleAssignments.ReadWrite.All is compromised or misused?

Is there a least-privilege alternative to using AppRoleAssignments.ReadWrite.All for assigning newly created groups to an Enterprise App?

Are there recommended best practices for securing automation apps that manage PIM-eligible groups and application assignments?

Any guidance or official Microsoft reference would be greatly appreciated.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

Your answer

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