Commands › SharePoint Online

Set-SPOTenantPreAuthSettings

SharePoint Online Microsoft.Online.SharePoint.PowerShell Set-*

Sets the configuration of pre-authentication.

Quick start script

# Set-SPOTenantPreAuthSettings — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOTenantPreAuthSettings
$before | Format-List

# 3. Make the change
Set-SPOTenantPreAuthSettings -Add <SwitchParameter> -Id <String> -IsDisabled <Boolean>

# 4. Verify and diff
$after = Get-SPOTenantPreAuthSettings
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 3 parameter sets

IsDisabled

Set-SPOTenantPreAuthSettings -IsDisabled <Boolean> [<CommonParameters>]

AddListItem

Set-SPOTenantPreAuthSettings [-Add] -Type <TenantPreAuthSettingsListType> [-IncludedApps <String>]
 [-ExcludedApps <String>] [-IncludedFeatures <String>] [-ExcludedFeatures <String>] [<CommonParameters>]

RemoveListItem

Set-SPOTenantPreAuthSettings [-Remove] -Id <String> [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Add SwitchParameter yes This parameter specifies that the operation of the cmdlet is to Add a setting to the allow list or deny list.
-ExcludedApps String This parameter value contains the apps ids to configure within the `-ExcludedApps` scope. Possible values include: `""`, `"Empty"`, or a comma-separated list of app IDs.
-ExcludedFeatures String This parameter value contains the feature names to configure within the `-ExcludedFeatures` scope. Possible values include: `""` or a comma-separated list of feature names (see NOTES section below).
-Id String yes This parameter identifies the list item setting to remove from the current configuration. It is only required with the `-Remove` parameter.
-IncludedApps String This parameter value contains the app ids to configure within the `-IncludedApps` scope. Possible values include: `""`, `"Empty"`, or a comma-separated list of app IDs.
-IncludedFeatures String This parameter value contains the feature names to configure within the `-IncludedFeatures` scope. Possible values include: `""` or a comma-separated list of feature names (see NOTES section below).
-IsDisabled Boolean yes This parameter allows the administrator to toggle pre-authentication for all apps and features to be either enabled or disabled.
-Remove SwitchParameter yes This parameter specifies that the operation of the cmdlet is to Remove a setting from the allow list or deny list.
-Type TenantPreAuthSettingsListType yes This parameter indicates whether the cmdlet is interacting with the allow list or the deny list.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.