Below is an example powershell script for disabling federated SSO for SharePoint: "claims-authn-sso-disable.ps1".

#
# PowerShell Script for disabling federated SSO for SharePoint.
#
# Determines a directory where this script is placed
$ScriptDirectory = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition

# Includes common configuration
. (Join-Path $ScriptDirectory claims-authn-sso-common.ps1)

# This disables claims authentication
$webApplication = GetSPWebApplication $webApplicationName
$webApplication.UseClaimsAuthentication = 0;
$webApplication.Update()

# This removes adds the self-signed IdP certificate from the list of trusted root certificates in Sharepoint
Remove-SPTrustedRootAuthority $idpTrustedRootCaName

# This removed SPTrustedIdentityTokenIssuer
Remove-SPTrustedIdentityTokenIssuer $idpName

  • No labels