SharePoint 2010 / 2013: FIM Sync – Most steps fail with “stopped-extension-dll-load”

This one may be a bit of a one-off. As far as I can tell, it’s only happened once in the history of SharePoint. However, that also means that documentation on this problem is non-existent, and if happened once, it could happen again.

 

Note: This is only valid for SharePoint 2010 and SharePoint 2013 when using the “Profile Synchronization” (FIM Sync) option to import user profiles into the User Profile Service Application.

 

Problem:

User Profile Synchronization is failing.

Nearly every Sync step within the Forefront Identity Manager (FIM) client (miisclient.exe) shows it failed with “stopped-extension-dll-load“.

 

Cause:

Some (unknown) environmental problem was preventing Forefront Identity Manager from loading the two SharePoint extension DLLs from their default location.

Every step that attempted to load one of the extension DLLs failed with “stopped-extension-dll-load”.

 

Resolution:

— First verify the location of the two extension DLLs. Make sure they are in the Extensions folder.

Default location for SharePoint 2013:

C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\Extensions\

 

Default location for SharePoint 2010:

C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Extensions\

 

— If the DLLs are present in the Extensions folder, but they still won’t load, we can add the two extension DLLs to the Global Assembly Cache.

For SharePoint 2013, you should be able to do that with PowerShell:

[System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)

$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall(“C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\Extensions\Microsoft.Office.Server.UserProfiles.ManagementAgent.dll”)

 

[System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)

$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall(“C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\Extensions\Microsoft.Office.Server.UserProfiles.MetaverseExtension.dll”)

 

For SharePoint 2010, you need to use GACUtil.exe to add the two extension DLLs to the Global Assembly Cache.

You’ll need to get the correct version of Gacutil from the .Net Framework 2.0 SDK: https://www.microsoft.com/en-us/download/details.aspx?id=15354

 

— Get it on to the Sync server and run it to install both extension DLLs into the Global Assembly Cache (GAC):

gacutil.exe /if “C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Extensions\Microsoft.Office.Server.UserProfiles.ManagementAgent.dll”

gacutil.exe /if “C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Extensions\Microsoft.Office.Server.UserProfiles.MetaverseExtension.dll”

 

— Restart both FIM services in services.msc

— Run a Full Synchronization.

 

More Information:

— If you ever move the User Profile Synchronization Service to a different server in the farm, the same steps may need to be taken there. It may be best to just GAC those two DLLs on every machine in the farm.

 

— These are the errors you’d see in the Application Event log:

Log Name: Application

Source: FIMSynchronizationService

Event ID: 6166

Task Category: Management Agent Run Profile

Level: Error

Keywords: Classic

User: N/A

Description:

The management agent “MOSS-aa40e987-262d-472b-aee7-4a10901409f9” failed on run profile “MOSS_DELTAIMPORT_239f6d19-9044-4309-bfc7-358d589d6ff6”. The run step stopped because a configured extension for this management agent could not be loaded.

User Action

Verify that the extension is located in the Extensions directory. If the extension is present, confirm that the version of the .NET framework that can run the extension is installed on the server and that a supportedRuntimes entry in the configuration files specifies that version. The synchronization engine will not be able to load an extension that is built with a newer version of the .NET framework than the version of the .NET runtime it is hosting.

 

Log Name: Application

Source: FIMSynchronizationService

Event ID: 6152

Task Category: Management Agent Run Profile

Level: Error

Keywords: Classic

User: N/A

Description:

The management agent “MOSSAD-Contoso” failed on run profile “DS_FULLSYNC”. The run step stopped because a required rules extension “Microsoft.Office.Server.UserProfiles.MetaverseExtension.dll” could not be loaded.

User Action

Verify that the extension is located in the Extensions directory. If the extension is present, confirm that the version of the .NET framework that can run the extension is installed on the server and that a supportedRuntimes entry in the configuration files specifies that version. The synchronization engine will not be able to load an extension that is built with a newer version of the .NET framework than the version of the .NET runtime it is hosting.