Skip to content

Commit

Permalink
update ConfigureUPAClaimProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvand committed Oct 30, 2023
1 parent d8f52b9 commit 4fcb92c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Templates/SharePoint-ADFS/dsc/ConfigureSPSE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1392,17 +1392,12 @@ configuration ConfigureSPVM
$psm = [Microsoft.Office.Server.UserProfiles.ProfileSubTypeManager]::Get($context)
$ps = $psm.GetProfileSubtype([Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName([Microsoft.Office.Server.UserProfiles.ProfileType]::User))
$properties = $ps.Properties
# $properties.Count # will call LoadProperties()
#$properties.GetType().GetMethod("LoadProperties", [System.Reflection.BindingFlags]"NonPublic, Instance").Invoke($properties, $null);

$PropertyNames = @('FirstName', 'LastName', 'SPS-ClaimID', 'PreferredName')
foreach ($propertyName in $PropertyNames) {
$propertyNames = @('FirstName', 'LastName', 'SPS-ClaimID', 'PreferredName')
foreach ($propertyName in $propertyNames) {
$property = $properties.GetPropertyByName($propertyName)
if ($property) {
Write-Host "Updating property $($propertyName)"
# $property.CoreProperty.DisplayNameLocalized
# $m_DisplayNamesValue = $property.CoreProperty.GetType().GetField("m_DisplayNames", [System.Reflection.BindingFlags]"NonPublic, Instance").GetValue($property.CoreProperty)
# Write-Host "Property $($propertyName) has m_DisplayNamesValue.DefaultLanguage $($m_DisplayNamesValue.DefaultLanguage) and m_DisplayNamesValue.Count $($m_DisplayNamesValue.Count)"
$property.CoreProperty.IsPeoplePickerSearchable = $true
$property.CoreProperty.Commit()
Write-Host "Updated property $($propertyName) with IsPeoplePickerSearchable: $($property.CoreProperty.IsPeoplePickerSearchable)"
Expand Down
Binary file modified Templates/SharePoint-ADFS/dsc/ConfigureSPSE.zip
Binary file not shown.

0 comments on commit 4fcb92c

Please sign in to comment.