TMA-M365-USER-CONSENT
Ensure users cannot consent to applications accessing company data
Opis
Illicit consent grants let malicious OAuth apps read mail and files without a password. Compliant when no self-service permission grant policy (ManagePermissionGrantsForSelf.*) is assigned to the default user role. 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.
Kako se proverava
Metod provere: Komanda ljuske
$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; $self = @($p.DefaultUserRolePermissions.PermissionGrantPoliciesAssigned | Where-Object { $_ -like 'ManagePermissionGrantsForSelf.*' }); if ($self.Count -eq 0) { 'compliant' } else { 'noncompliant' }- Očekivani izlaz
compliant
Kako se ispravlja
Metod ispravke: Smernica ili zakrpa infrastrukture
Entra admin center > Enterprise applications > Consent and permissions > User consent settings > Do not allow user consent, and enable the admin consent workflow.
Svojstva
- Operativni sistemi
- Bilo koji
- Oznake
- m365identity
- Referenca
- CIS Microsoft 365 Foundations Benchmark v7.0.0 - Microsoft Entra ID / Enterprise applications - user consent (verify section number for your release)
Proverite ovaj računar
Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.
tmaegis scan --target m365 --level 2