Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPUserProfileSyncConnection: Multiple issues

See original GitHub issue

Details of the scenario you tried and the problem that is occurring

1: Modifying Included OUs and Excluded OUs fails updating the configured OUs because the returned list is a copy of the internal list of OUs. DirectoryServiceNamingContext.ContainersExcluded and DirectoryServiceNamingContext.ContainersIncluded returns a new list for each call, so any modifications of these will not be persisted in SharePoint.

2: On SharePoint 2016(2019) all tests fails

3: Updating/modifying existing sync connections fails with exception.

4: ExcludedOUs does not add to the list of excluded OUs in SP2016(2019?)

Verbose logs showing the problem

1: N/A

2: N/A

3: Fails with exception: connection exists and forest is different. use force

4: N/A

Suggested solution to the issue

1: Reflection needs to be used to modify the instance variables containersIncluded and containersExcluded for all operations (clear and add)

2a: Get method needs to replace occurrences of ‘,DC=’ with ‘.’ and remove remaining occurences of ‘DC=’ for return value Forrest

2b: Get method encapsulates the OUs in an array which will prevent test method to correctly work when there are more than one OU. This encapsulation (1, 2) needs to be removed.

3: $connection.Server is internal in SharePoint 2016 and the if statements will therefore always lead to this exception in SP2016 (2019?). This code is only used when executing in a SP2013 environment, so it should be moved into the switch statement further down so that it’s only executed on a SharePoint 2013 environemnt.

4: ExludedOUs are implemented as removal of existing IncludedOUs in the sync connection. Excluded OUs should therefore be removed from values to check in the test method and this should be pointed out in the documentation. Alternatively this needs to be implemented so that ExcludedOUs are added to the list of excluded OUs in the sync connection.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

OsName : Microsoft Windows Server 2016 Datacenter OsOperatingSystemSKU : DatacenterServerEdition OsArchitecture : 64-bit WindowsBuildLabEx : 14393.2724.amd64fre.rs1_release.181231-1751 OsLanguage : en-US OsMuiLanguages : {en-US}#### Version of SharePoint that is used (e.g. SharePoint 2016)

Version of SharePoint that is used (e.g. SharePoint 2016)

SharePoint 2016/2013

Version and build of PowerShell the target node is running

Name Value

PSVersion 5.1.14393.2636 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.14393.2636 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion

Version of the DSC module that was used (‘dev’ if using current dev branch)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

jensottocommented, Apr 11, 2019

No, I’ve not been able to look further into this. I will try to see if I can get something done within a couple of weeks.

luigilinkcommented, Oct 1, 2019

The issue still present in SharePoint 2013 for this closed issue:

See my last comment Do I add a new issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AD account with SP user profile synchronization issue
Go to user profile service application->Configure Synchronization connections, check if the connection is configured correctly.
Read more >
SharePoint 2019 On-prem User Profiles not populating ...
I've created an on-prem SP 2019 installation. Everything seems to be working except the User Profile Synchronization.
Read more >
Overcoming Frustrations with the SharePoint 2013 User ...
Overcoming Frustrations with the SharePoint 2013 User Profile Service and that Annoying Add-SPProfileSyncConnection Cmdlet. SharePoint 2013 ...
Read more >
User Profile Sync not importing AD Users
One thought on “User Profile Sync not importing AD Users – The management agent “AD-Connection-Name” failed on run profile “DS_FULLIMPORT” ...
Read more >
SharePoint Online UserProfiles and the story about ... - Blog
This article shows the actual state in SharePoint Online 2013 and covers the HowTo about this syncing processes. Why two user storages? Well,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found