From 1ca07fb99b3e0a877cd67a3852e85a45908ca9bc Mon Sep 17 00:00:00 2001 From: Yvan Duhamel Date: Thu, 3 Dec 2020 09:38:11 +0100 Subject: [PATCH] Do not set ProviderSignOutUri in SP2013 --- CHANGELOG.md | 4 ++++ .../MSFT_SPTrustedIdentityTokenIssuer.psm1 | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74497ecfa..8da394b06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- SPTrustedIdentityTokenIssuer + - Do not set property ProviderSignOutUri in SharePoint 2013 as it does + not exist + ### Fixed - SPWebAppPolicy diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 index 364f3197a..67b7c6283 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 @@ -342,7 +342,12 @@ function Set-TargetResource if ($params.ProviderSignOutUri) { - $trust.ProviderSignOutUri = New-Object -TypeName System.Uri ($params.ProviderSignOutUri) + $installedVersion = Get-SPDscInstalledProductVersion + # This property does not exist in SharePoint 2013 + if ($installedVersion.FileMajorPart -ne 15) + { + $trust.ProviderSignOutUri = New-Object -TypeName System.Uri ($params.ProviderSignOutUri) + } } $trust.Update() }