# App registrations with highly privileged directory roles should not have owners

Owners with lower privilege than the application should be removed from ownership.

Source: https://maester.dev/docs/tests/MT.1078

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/cloud-architekt" title="Thomas Naunheim · Original author"><img src="https://github.com/Cloud-Architekt.png" alt="Thomas Naunheim" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/cloud-architekt">Thomas Naunheim</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/maester">Maester</a> · Defender · Exposure Management · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId MT.1078
```

## Overview

Owners with lower privilege than the application should be removed from ownership.
Microsoft also mentions this [risk of elevation of privilege](https://learn.microsoft.com/entra/identity/enterprise-apps/overview-assign-app-owners) over what the owner has access to as a user.
Those delegations can be identified by the `Tier breach` flag in the test results.

But even owners with the same or higher privilege should not be delegated ownership because of missing support for just-in-time access (eligibility in PIM), enforced step-up authentication (authentication context by PIM in Entra ID roles), or assignment via group membership.

_Side Note: Currently, due to limitations of XSPM data, only assignments on application objects are identified._

### How to fix

Remove ownership and replace it (if necessary) by using [object-level role assignments](https://learn.microsoft.com/entra/identity/role-based-access-control/manage-roles-portal?tabs=admin-center#assign-roles-with-app-registration-scope), and avoid any lateral movement paths by delegating to administrators with lower privilege classification (tier breach).

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | MT.1078 |
| Severity | Medium |
| Suite | Maester |
| Product | Defender |
| Related products | Entra ID |
| Feature | Exposure Management |
| Area | Applications and workload identities |
| Resource type | Application |
| User impact | Low |
| Implementation cost | Medium |
| MITRE ATT&CK | T1098.001 Additional Cloud Credentials |
| Supports controls | nist-800-53-r5:AC-6 |
| PowerShell test | [Test-MtXspmAppRegWithPrivilegedRolesAndOwners](https://github.com/maester365/maester/blob/main/tests/maester/xspm/Test.MT.1078.ps1) |
| Services | Graph |
| Long running | Yes |

</details>

## Source

- Test: [`tests/maester/xspm/Test.MT.1078.ps1`](https://github.com/maester365/maester/blob/main/tests/maester/xspm/Test.MT.1078.ps1)
- Documentation: [`tests/maester/xspm/Test.MT.1078.md`](https://github.com/maester365/maester/blob/main/tests/maester/xspm/Test.MT.1078.md)
