using powershell disable security defaults to avoid MFA for admin users

Saikumar 20 Reputation points
2023-05-03T10:44:29.54+00:00

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.
10,505 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,354 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,379 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 94,521 Reputation points MVP
    2023-05-03T15:36:56.6166667+00:00

    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