Skip to content

Enable-EntraMFA

SYNOPSIS

Enable Multi-Factor Authentication (MFA) for a user in Azure Active Directory.

SYNTAX

Enable-EntraMFA [-UserName] <String> [-NoMobileAuth] [<CommonParameters>]

DESCRIPTION

The `Enable-EntraMFA` function enables Multi-Factor Authentication (MFA) for a specified user in Azure Active Directory. It validates the user's existence, checks for a valid mobile phone number, and registers the phone as an authentication method. The function also supports skipping mobile authentication if specified.

EXAMPLES

EXAMPLE 1

Enable-EntraMFA -UserName "jdoe"

Enables MFA for the user "jdoe" and registers their mobile phone as an authentication method.

EXAMPLE 2

Enable-EntraMFA -UserName "jdoe" -NoMobileAuth

Enables MFA for the user "jdoe" without setting up mobile phone authentication.

PARAMETERS

-UserName

The username (sAMAccountName) of the user for whom MFA will be enabled.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoMobileAuth

A switch parameter that, when specified, skips the mobile phone authentication setup.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES