The SharePoint admin center writes Conditional Access policies for you
When an admin saves Access control → Unmanaged devices (Block access or Allow limited, web-only access) in the SharePoint admin center, SharePoint creates new Entra Conditional Access policies that apply to all users and disables the policies it created the previous time — customisations are not carried over. The policies are named [SharePoint admin center]…, so every change leaves another disabled copy behind. An enabled one targets all users and nobody added your emergency-account exclusion to it; the policy that blocks apps on unmanaged devices can lock admins out of desktop tools such as Graph PowerShell on an unmanaged machine (sign-in error AADSTS53000, "Device isn't in required device state"). Audit them by name prefix; don't assume every CA policy was created by the CA team.
Uložení Access control → Unmanaged devices v centru pro správu SharePointu založí nové zásady podmíněného přístupu Entra pro všechny uživatele a vypne ty, které založilo minule – vlastní úpravy se nepřenesou. Jmenují se [SharePoint admin center]…, takže každá změna nechá další vypnutou kopii. Zapnutá platí pro všechny a výjimku nouzových účtů do ní nikdo nepřidal; zásada blokující aplikace na nespravovaných zařízeních umí zamknout správce v nástrojích mimo prohlížeč (chyba AADSTS53000). Hledej je podle předpony názvu a nepředpokládej, že všechny zásady podmíněného přístupu založil ten, kdo je spravuje.
Symptom
- The Conditional Access list contains policies you never created, e.g.
[SharePoint admin center]Block access from apps on unmanaged devices…and[SharePoint admin center]Use app-enforced Restrictions for browser access…, several of them Off. - After someone "just tightened SharePoint", an admin running Graph PowerShell or another desktop client from an unregistered machine gets
AADSTS53000. - Your break-glass exclusion audit flags a policy nobody on the identity team owns.
Cause
Per Microsoft Learn, selecting Block access or Allow limited, web-only access "disables any previous conditional access policies you created from this page and creates a new conditional access policy that applies to all users. Any customizations you made to previous policies won't be carried over." The setting is a SharePoint page, but the result lives in Entra — so it bypasses whatever review and exclusion conventions the tenant applies to Conditional Access.
Fix / pattern
- Detect by name prefix, case-insensitive:
/^\s*\[sharepoint admin center\]/ioverdisplayNamefromGET /identity/conditionalAccess/policies(delegatedPolicy.Read.All, tenant needs Entra ID P1). - Enabled (
state: enabled) → evaluate it like any other all-users policy: does it exclude the emergency accounts (directly or via a group)? If not, treat it as a high-severity lockout risk. - Disabled (
state: disabled) → low severity, housekeeping: delete it in Entra or keep one documented copy. Don't count it in coverage (it protects nothing) and don't count it in exclusion audits (it can't lock anyone out). - If you need the SharePoint behaviour long-term, prefer a hand-built policy (Office 365 app, app-enforced restrictions session control, emergency accounts excluded), as Microsoft Learn describes, and leave the SharePoint page alone afterwards — saving it again creates new all-users policies next to yours.
const SPO = /^\s*\[sharepoint admin center\]/i;
const policies = (await graphGetAll('/identity/conditionalAccess/policies'));
const spo = policies.filter(p => SPO.test(p.displayName || ''));
const live = spo.filter(p => p.state === 'enabled'); // audit like any all-users policy
const leftovers = spo.filter(p => p.state === 'disabled'); // cleanup list
Related
perUserMfaStatesays "disabled" under Conditional Access- Entra policy writes that replace the whole value
- Microsoft Learn: SharePoint and OneDrive unmanaged device access controls
- Microsoft Learn: Use application enforced restrictions for unmanaged devices