TMAegisBeta
更多 m365 規則

Microsoft 365

TMA-M365-APP-REGISTRATION

Ensure third-party integrated applications cannot be registered by users

中等級 1自動化m365

說明

Allowing every user to register applications enables persistence and phishing through attacker-controlled app registrations. Requires an already-connected Microsoft Graph session: Install-Module Microsoft.Graph; Connect-MgGraph -Scopes Policy.Read.All,Directory.Read.All,RoleManagement.Read.Directory (read-only scopes). The audit throws if no session exists.

檢查方式

稽核方法: Shell 指令

shell
$ErrorActionPreference = 'Stop'; if (-not (Get-Command Get-MgContext -ErrorAction SilentlyContinue) -or -not (Get-MgContext)) { throw 'Not connected: run Connect-MgGraph first' }; $p = Get-MgPolicyAuthorizationPolicy -ErrorAction Stop; if ($p.DefaultUserRolePermissions.AllowedToCreateApps -eq $false) { 'compliant' } else { 'noncompliant' }
預期輸出
compliant

修補方式

修補方法: 操作指南或基礎設施修補檔

Entra admin center > Identity > Users > User settings > Users can register applications = No (or Update-MgPolicyAuthorizationPolicy with DefaultUserRolePermissions.AllowedToCreateApps = $false).

屬性

作業系統
不限
標籤
m365identity
參考資料
CIS Microsoft 365 Foundations Benchmark v7.0.0 - Microsoft Entra ID / Users can register applications (verify section number for your release)

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target m365