SPOTenantPreAuthSettings
S’applique à : SharePoint Online
Sets the configuration of pre-authentication.
You can use this cmdlet to configure or disable the pre-authentication feature within SharePoint Online. The disablement can be combined with switches to support granular pre-authentication management for specific apps and features at the tenant level.
You must be a SharePoint Administrator to run the cmdlet.
Cmdlets disponibles
Paramètres
| Nom | Type | Valeur par défaut | Valeurs acceptées |
|---|---|---|---|
| Add | System.Management.Automation.SwitchParameter | ||
| ExcludedApps | System.String | ||
| ExcludedFeatures | System.String | ||
| Id | System.String | ||
| IncludedApps | System.String | ||
| IncludedFeatures | String | ||
| IsDisabled | Boolean | ||
| Remove | System.Management.Automation.SwitchParameter | ||
| Type | TenantPreAuthSettingsListType | Allow, Deny |
Exemples
Example 1
Set-SPOTenantPreAuthSettings -IsDisabled $true
Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "029e7c27-4b9c-4f8b-ba32-b96249468d42,0ab82eba-96c7-4681-9f75-c18437e20d0e" This example disables pre-authentication overall and adds a setting that allows two apps to use pre-authentication for all features.
Example 2
Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "029e7c27-4b9c-4f8b-ba32-b96249468d42,0ab82eba-96c7-4681-9f75-c18437e20d0e" -ExcludedApps "" -IncludedFeatures "" -ExcludedFeatures "" This example performs the same function as example 1 except in this case the switches for -ExcludedApps, -IncludedFeatures, and -ExcludedFeatures are added to the cmdlet.
These switches are assumed to take the default value of "" if not used with the cmdlet and example 2 is used to demonstrate the complete set of switches only.
Example 3
Set-SPOTenantPreAuthSettings -Remove -Id "368dde6f-c857-4383-a8a7-02a04a294e6d" This example will remove an existing item from the current list of items. The remove switch can remove allow or deny entries from the list.
Example 4
Set-SPOTenantPreAuthSettings -IsDisabled $true
Set-SPOTenantPreAuthSettings -Add -Type Allow -ExcludedApps "029e7c27-4b9c-4f8b-ba32-b96249468d42" -ExcludedFeatures "Download,WebRenderingEmbed" This example disables pre-authentication overall and allows all apps apart from one to use pre-authentication for all features except for "Download" and "WebRenderingEmbed".
In this case, the app "029e7c27-4b9c-4f8b-ba32-b96249468d42" will always be denied from using pre-authentication since it is excluded from the allow list setting. Any other app will be allowed to use pre-authentication for any feature apart from "Download" and "WebRenderingEmbed".
Example 5
Set-SPOTenantPreAuthSettings -IsDisabled $true
Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "029e7c27-4b9c-4f8b-ba32-b96249468d42" -IncludedFeatures "OfficeOnline,WebRenderingEmbed,Download"
Set-SPOTenantPreAuthSettings -Add -Type Deny -IncludedApps "029e7c27-4b9c-4f8b-ba32-b96249468d42,0ab82eba-96c7-4681-9f75-c18437e20d0e" This example disables pre-authentication overall but contains an overlap between the settings in the Allow list and Deny list. It first allows an app to use pre-authentication for the "OfficeOnline", "WebRenderingEmbed", and "Download" features. But in the final execution of the cmdlet, it denies the same app from using pre-authentication for all features.
In this case, the app "029e7c27-4b9c-4f8b-ba32-b96249468d42" would not be allowed to use pre-authentication for any of the allow-listed features despite having the setting. This is because the Deny list takes precedence over the Allow list.
Example 6
Set-SPOTenantPreAuthSettings -IsDisabled $false
Set-SPOTenantPreAuthSettings -Add -Type Deny -IncludedApps "Empty" This example enables pre-authentication overall and denies requests that are not coming from an app (e.g. requests coming via a browser) from using pre-authentication for all features.