# Subscriptions should be blocked from leaving and entering the tenant

Subscriptions should be blocked from leaving and entering the tenant. A Maester check for Azure, Subscriptions.

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

<!-- 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/oppedijk" title="Erik Oppedijk · Original author"><img src="https://github.com/Oppedijk.png" alt="Erik Oppedijk" width="28" height="28" loading="lazy" decoding="async" /></a><a class="test-byline-avatar" href="/contributors/merill" title="Merill Fernando · Co-contributor"><img src="https://github.com/merill.png" alt="Merill Fernando" 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/oppedijk">Erik Oppedijk</a> with <a href="/contributors/merill">Merill Fernando</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> · Azure · Subscriptions · <a href="/docs/tests">All checks</a></p>

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

## Overview

Subscriptions should be blocked from leaving and entering the tenant.

The tenant subscription policy controls whether subscription owners can move a subscription out of the tenant or bring one in from another tenant. Allowing subscriptions to leave can let a privileged user transfer a subscription and its resources to an external tenant. Allowing subscriptions to enter can let a user bring in a subscription they control, together with its resources and role assignments.

Since 1 May 2026 Microsoft blocks both directions by default for tenants that never set a policy. A tenant that set **Allow everyone** before then keeps that setting. This check also covers CIS Microsoft Azure Foundations Benchmark v6.0.0 recommendation 5.6.

#### Remediation action

1. Sign in to the [Azure portal](https://portal.azure.com) as a Global Administrator with a direct role assignment, and [elevate access](https://learn.microsoft.com/azure/role-based-access-control/elevate-access-global-admin) to manage all Azure subscriptions. Other users can read the policy but not change it.
2. Go to **Subscriptions** and select **Manage Policies**.
3. Set **Subscription leaving Microsoft Entra tenant** and **Subscription entering Microsoft Entra tenant** to **Permit no one**.
4. If specific users must still move subscriptions, add them to **Exempted Users**.
5. Select **Save changes**.

#### Related links

- [Manage Azure subscription policies - Microsoft Learn](https://learn.microsoft.com/azure/cost-management-billing/manage/manage-azure-subscription-policy)
- [Azure portal](https://portal.azure.com)

## Details

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

| Field | Value |
| --- | --- |
| Test ID | MT.1227 |
| Severity | Medium |
| Suite | Maester |
| Product | Azure |
| Feature | Subscriptions |
| Area | Infrastructure hardening |
| Resource type | Tenant |
| User impact | Low |
| Implementation cost | Low |
| MITRE ATT&CK | T1537 Transfer Data to Cloud Account |
| Supports controls | nist-800-53-r5:AC-4 |
| PowerShell test | [Test-MtSubscriptionTransferBlocked](https://github.com/maester365/maester/blob/main/tests/maester/azure/Test.MT.1227.ps1) |
| Services | Azure |

</details>

## Source

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