'Enforcing 2FA with MS Graph module instead of Azure AD module
I have unattended scripts for creating new MS 365 users which currently do the following:
$AuthObject = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$AuthObject.RelyingParty = '*'
$AuthObject.State = 'Enabled'
$AuthObjectArray = @($AuthObject)
Set-MsolUser -UserPrincipalName $Email -StrongAuthenticationRequirements $AuthObjectArray
This enables 2FA on the account.
I want to migrate away from the Azure AD module (being deprecated) to MS Graph, how do I achieve the same thing with 'Update-MgUser', 'Update-MgUserSetting' or 'New-MgUser'?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
