1. Over-privileged app roles via appRoles You can define custom roles in the appRoles array. The danger: any admin can assign users to those roles without extra approval if the app has been consented. Audit appRoles regularly. 2. Leaking identifierUris If your app uses identifierUris (e.g., api://my-app ), that URI becomes a potential token target. An attacker who can register a conflicting URI in another tenant cannot take over your app—but they can cause token validation confusion if your app incorrectly validates the aud claim. 3. requiredResourceAccess creep Apps can request requiredResourceAccess —permissions they need. Over time, developers add scopes but never remove old ones. Attackers can use orphaned, high-privilege permissions if an app's secret is compromised.
GET /applications?$expand=requiredResourceAccess Then compare with actual API calls. If you expose an API ( api.oauth2PermissionScopes ), the default scope user_impersonation is not automatically added. Many developers forget to define it, then wonder why "Sign in & read user profile" doesn't work. 6. Performance & Throttling Realities This endpoint lives under the /v1.0 workload, which has different throttling than /beta . https- graph.microsoft.com v1.0 applications
In this post, we’ll tear down the endpoint, explore its hidden properties, look at real-world automation patterns, and cover the security pitfalls that even seasoned admins miss. Before writing code, we need to clear up a massive source of confusion. Audit appRoles regularly
But that’s not the same as a ( /servicePrincipals ), which is the instance of that app in a specific tenant. An attacker who can register a conflicting URI