Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

since 5 days we are running into massive errors, when our AD synch is running.

The error code from the event viewer looks like this: EventID 6801

The extensible extension returned an unsupported error. The stack trace is: "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Office.Server.UserProfiles.UserProfileException: An error occurred while updating the user profile. at Microsoft.Office.Server.UserProfiles.UserProfile.UpdateProfile(UserProfileUpdateWrapper update, Boolean forceBypassCanary) at Microsoft.Office.Server.UserProfiles.UserProfile.Commit() at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String strAccountName) at Microsoft.Office.Server.UserProfiles.ProfileImportExportService.UpdateWithProfileChangeData(Int64 importExportId, ProfileChangeData[] profileChangeData) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Office.Server.WebServiceDirectProxy.WebMethodInfo.Invoke(Object webServiceInstance, Object[] args) at Microsoft.Office.Server.WebServiceDirectProxy.Invoke(String methodName, Object[] args) at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportDirect.UpdateWithProfileChangeData(Int64 importExportId, ProfileChangeData[] profileChangeData) at Microsoft.Office.Server.UserProfiles.ManagementAgent.ProfileImportExportExtension.Microsoft.MetadirectoryServices.IMAExtensibleCallExport.ExportEntry(ModificationType modificationType, String[] changedAttributes, CSEntry csentry) Forefront Identity Manager 4.0.2450.47"

The error occurs several hundred times per sync, indicating one error per user to import/sync.

I hope you can give me a bump in the right direction, because I am running out of ideas as of now.

/edit how stupid of me: We are running Sharepoint 2010.

share|improve this question
1  
Do you see any other errors in the FIM client itself? C:\Program Files\Microsoft Office Server\14.0\Synchronization Service\UIShell\miisclient.exe –  Thomas Vochten Feb 1 '13 at 7:53
    
Yes it does indeed throw errors. I can't post it as it is here, because its company stuff, but let me interpret it: There are 4 successfull events and the fith event "MOSS-EXPORT-xxxxxxxxx" always fails. After every failed event there is an AD-user listed. The error is called: ma-extension-error –  Serv Feb 1 '13 at 8:36
    
Another note from the FIM UI: After I click on a specific error and "validate schema against object" I get the error Required attribute 'AccountName' is missing –  Serv Feb 1 '13 at 8:58
    
Are you pushing anything to AD? or only reading/importing from AD? –  Falak Mahmood Feb 1 '13 at 9:02
    
We are only reading from AD as far as I am aware –  Serv Feb 1 '13 at 9:40

2 Answers 2

When doing anything with UPS I recommend you disable the MySite cleanup timer job (if you are using My Sites), as well as backing up your profile database if it has data that is pulled from AD. when starting the UPS remember that you need an account that is part of the farm administrator group AND a local admin of the machine hosting UPS.

Also do a check of the sync databases, and delete any old references. to list databases

stsdm -o sync -listolddatabases 1

That will show all databases that did not sync correctly in the last day. To delete the reference:

stsadm -o sync -deleteolddatabases 1

Sometimes having old databases show up here messes up the sync operation.

Also you can use the following script from Microsoft to assist in resetting UPS.
( TechNet URL http://gallery.technet.microsoft.com/office/Reset-the-User-Profile-cebcdee1 ).

As with any script you get off the Interwebs, test before using in Production.

Function Set-OSCSPUserProfileSyncSvc
{
    [CmdletBinding()]
    Param
    (
        #Define parameters
        [Parameter(Mandatory=$true,Position=1)]
        [string]$DisplayName,
        [Parameter(Mandatory=$true,Position=2)]
        [System.Management.Automation.PSCredential]$FarmAccount
    )
    Process
    {
        Try
        {
            #Get SharePoint Service Application according to the specified display name.
            $verboseMsg = $Messages.GetSPSvcApp
            $verboseMsg = $verboseMsg -replace "Placeholder01",$DisplayName
            $pscmdlet.WriteVerbose($verboseMsg)
            $spSvcApp = Get-SPServiceApplication -Name $DisplayName -ErrorAction Stop -Verbose:$false
        }
        Catch
        {
            #If Get-SPServiceApplication failed for any reason, this function will be terminated.
            $errorMsg = $Messages.CannotFindAppWithSpecifiedDisplayName
            $errorMsg = $errorMsg -replace "Placeholder01",$DisplayName
            $customError = New-OSCPSCustomErrorRecord `
            -ExceptionString $errorMsg `
            -ErrorCategory NotSpecified -ErrorID 1 -TargetObject $pscmdlet
            $pscmdlet.WriteError($customError)
            return $null
        }
        #If $spSvcApp is not a User Profile Service Application, this function will be terminated.
        if ($spSvcApp.TypeName -eq "User Profile Service Application") {
            #Get related information from environment and user input.
            $computerName = $env:ComputerName
            $farmAccountUserName = $FarmAccount.UserName
            $farmAccountPassword = $FarmAccount.Password
            if ($farmAccountUserName -ne $((Get-SPFarm -Verbose:$false).DefaultServiceAccount.Name)) {
                $errorMsg = $Messages.WrongSvcAccount
                $customError = New-OSCPSCustomErrorRecord `
                -ExceptionString $errorMsg `
                -ErrorCategory NotSpecified -ErrorID 1 -TargetObject $pscmdlet
                $pscmdlet.WriteError($customError)
                return $null            
            }
            #Get SharePoint User Profile Synchronization Service instance and modify the properties.
            $verboseMsg = $Messages.GetUPSS
            $pscmdlet.WriteVerbose($verboseMsg)
            $spSvcInstance = Get-SPServiceInstance -Verbose:$false | Where-Object {$_.TypeName -eq "User Profile Synchronization Service"}
            if ($spSvcInstance.Status -eq [Microsoft.SharePoint.Administration.SPObjectStatus]::Disabled) {
                $verboseMsg = $Messages.UpdateSvcAcct
                $pscmdlet.WriteVerbose($verboseMsg)             
                $spSvcApp.SetSynchronizationMachine($computerName,$spSvcInstance.Id,$farmAccountUserName,$farmAccountPassword)
                $spSvcInstance.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Provisioning
                $spSvcInstance.IsProvisioned = $false
                $spSvcInstance.UserProfileApplicationGuid = $spSvcApp.Id
                $spSvcInstance.Update()
            } else {
                $errorMsg = $Messages.CannotSetUPSyncSvc
                $errorMsg = $errorMsg -replace "Placeholder01",$($spSvcInstance.Status)
                $customError = New-OSCPSCustomErrorRecord `
                -ExceptionString $errorMsg `
                -ErrorCategory NotSpecified -ErrorID 1 -TargetObject $pscmdlet
                $pscmdlet.WriteError($customError)
            }
        } else {
            $errorMsg = $Messages.WrongSvcAppType
            $errorMsg = $errorMsg -replace "Placeholder01",$DisplayName
            $errorMsg = $errorMsg -replace "Placeholder02",$($spSvcApp.TypeName)
            $customError = New-OSCPSCustomErrorRecord `
            -ExceptionString $errorMsg `
            -ErrorCategory NotSpecified -ErrorID 1 -TargetObject $pscmdlet
            $pscmdlet.WriteError($customError)
            return $null            
        }
    }
}
share|improve this answer
    
already did this, but without that particular script. Did not bring a solution –  Serv Feb 4 '13 at 7:17

Sounds like your FIM configuration is corrupted somehow. I suggest you first try to remove your import connection and recreate it.

If that does not help, you'll have to reprovision your User Profile Synchronization service instance. That will recreate all settings in the FIM client.

You don't have to remove the User Profile Service Application to do that, just go to services on server and stop/start the service instance:

enter image description here

When you try to stop it, the following message appears:

enter image description here

Stopping this service is a lot quicker than starting (provisioning) it unfortunately. So after it stopped, start it again. You'll have to give the farm account's password to start it up.

In order to be able to start it, make sure you fulfill all prerequisites as if you were starting the instance for the first time: the main one having the farm account in the local administrators group.

All requirements are listed here: http://technet.microsoft.com/en-us/library/ee721049(v=office.14).aspx

share|improve this answer
    
Recreating the connection to the AD did not bring a solution. Would you please explain, what you mean by "undprovision and reprovision"? The only thing my CA is offering me is to start or stop a service. –  Serv Feb 1 '13 at 13:03
    
Edited my answer –  Thomas Vochten Feb 1 '13 at 15:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.