Skip to content

Commit

Permalink
Merge pull request #1343 from ykuijs/master
Browse files Browse the repository at this point in the history
[SPTrustedIdentityTokenIssuer] Fixes issue with checking incorrect IdentifierClaim
  • Loading branch information
ykuijs authored Aug 31, 2021
2 parents 8214236 + 478c65f commit 5e150df
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SPSite
- Implemented workaround to prevent issue with creating site collections immediately after
farm creation (Error "Invalid field name. {cbb92da4-fd46-4c7d-af6c-3128c2a5576e}")
- SPTrustedIdentityTokenIssuer
- Fixed issue where the IdentifierClaim was not properly detected in the Set method
- SPWorkManagementServiceApp
- Updated links to Docs instead of old TechNet

Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ function Get-TargetResource
$description = $spTrust.Description
$realm = $spTrust.DefaultProviderRealm
$signInUrl = $spTrust.ProviderUri.OriginalString
$identifierClaim = $spTrust.IdentityClaimTypeInformation.MappedClaimType
$identifierClaim = $spTrust.IdentityClaimTypeInformation.InputClaimType
$SigningCertificateThumbprint = $spTrust.SigningCertificate.Thumbprint
$currentState = "Present"
$claimProviderName = $sptrust.ClaimProviderName
@@ -299,7 +299,7 @@ function Set-TargetResource
}

$mappings = ($claimsMappingsArray | Where-Object -FilterScript {
$_.MappedClaimType -like $params.IdentifierClaim
$_.InputClaimType -like $params.IdentifierClaim
})
if ($null -eq $mappings)
{
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ try
InModuleScope -ModuleName $script:DSCResourceFullName -ScriptBlock {
Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture {
BeforeAll {
Invoke-Command -Scriptblock $Global:SPDscHelper.InitializeScript -NoNewScope
Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope

# Mocks for all contexts
Mock -CommandName Get-ChildItem -MockWith {
@@ -73,7 +73,7 @@ try

Mock -CommandName New-SPClaimTypeMapping -MockWith {
return [pscustomobject]@{
MappedClaimType = $testParams.IdentifierClaim
InputClaimType = $testParams.IdentifierClaim
}
}

@@ -543,7 +543,7 @@ try

Mock -CommandName New-SPClaimTypeMapping -MockWith {
return [pscustomobject]@{
MappedClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
InputClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
}
}
}

0 comments on commit 5e150df

Please sign in to comment.