Skip to main content

Connect-XdrByPhoneSignIn

SYNOPSIS​

Authenticates to Microsoft Defender XDR using Microsoft Authenticator phone sign-in.

SYNTAX​

Connect-XdrByPhoneSignIn [[-Username] <String>] [[-TenantId] <String>] [[-TimeoutSeconds] <Int32>]
[[-UserAgent] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

Starts the Defender portal phone sign-in flow without launching a browser, shows the number returned by Entra ID when available, waits for Microsoft Authenticator approval, captures the resulting ESTSAUTH cookie, and then passes it to Connect-XdrByEstsCookie to establish the Defender XDR session.

EXAMPLES​

EXAMPLE 1​

Connect-XdrByPhoneSignIn -Username 'admin@contoso.com'

Starts the headless phone sign-in flow and connects to Defender XDR.

EXAMPLE 2​

Connect-XdrByPhoneSignIn -Username 'admin@contoso.com' -TenantId '8612f621-73ca-4c12-973c-0da732bc44c2'

Starts the headless phone sign-in flow and connects to the specified tenant.

PARAMETERS​

-Username​

Optional username to use for phone sign-in. If omitted, you are prompted interactively.

Type: String
Parameter Sets: (All)
Aliases:

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

-TenantId​

Optional tenant ID to use when bootstrapping the Defender XDR session.

Type: String
Parameter Sets: (All)
Aliases:

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

-TimeoutSeconds​

Maximum time to wait for the phone sign-in approval to complete.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-UserAgent​

User-Agent string for HTTP requests. Defaults to a browser-compatible Edge user agent.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: (Get-XdrDefaultUserAgent)
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction​

The ProgressAction parameter is a common parameter, not a cmdlet parameter. For more information, see about_CommonParameters.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
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​