Set-MgGraphOption

Sets global configurations that apply to the SDK. For example, toggle Web Account Manager (WAM) support.

Syntax

__AllParameterSets

Set-MgGraphOption
    [-DisableLoginByWAM <bool>]
    [<CommonParameters>]

Description

Sets global configurations that apply to the SDK. For example, toggle Web Account Manager (WAM) support.

Examples

Disable web account manager support

PS C:> Set-MgGraphOption -DisableLoginByWAM $True

Disables sign in via Web Account Manager (WAM). Note: This only takes effect when using a custom ClientId. When using the default ClientId, WAM remains enabled regardless of this setting.

Disable WAM for sovereign cloud environments

PS C:> Set-MgGraphOption -DisableLoginByWAM $true PS C:> Connect-MgGraph -ClientId "YOUR_APP_CLIENT_ID" -TenantId "YOUR_TENANT_ID" -Environment BleuCloud

If WAM broker-based authentication hangs or times out when connecting to a sovereign cloud environment (such as BleuCloud, DelosCloud, or GovSGCloud), disable WAM to fall back to interactive browser sign-in. This can occur when authenticating from environments like jumpboxes. The setting persists across PowerShell sessions.

Parameters

-DisableLoginByWAM

{{ Fill DisableLoginByWAM Description }}

Parameter properties

Type:

System.Nullable`1[System.Boolean]

Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Outputs

System.Object