using powershell disable security defaults to avoid MFA for admin users

Saikumar 20 Reputation points

Hi, i'm trying to automate 'disabling security defaults to avoid MFA'
i have global admin rights, with out using Microsoft graph policies can i disable it using script.

can you please help,i have gone through some articles using microsoft graph

Please suggest me on this it will be so helpful

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,056 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,430 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,099 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 98,201 Reputation points MVP

    Have you tried using the Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy cmdlet?

    Connect-MgGraph -Scopes Policy.ReadWrite.ConditionalAccess, Policy.Read.All
    Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy | select IsEnabled
    Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy -IsEnabled:$false

0 additional answers

Sort by: Most helpful