none
User Profile Service is not updating from AD after crawl RRS feed

  • 질문

  • Hi Everyone,

    You are my last hope. For the past few days I have been trying to resolve this without luck. Can't find anything online helpful. 

    A week or so ago we noticed the UPS was not updating profiles from current data in AD. The service has been enabled for a while and working as expected (as far as we know until recently). Users that had requested for changes to their profiles in AD (work phone, email, office, etc) noticed that this information has not been reflecting correctly in SharePoint. 

    In a closer look to the SharePoint configuration everything looks ok, the USPA  timer job is enabled and "running", the crawl runs and completes apparently fine, however changes are not being propagated correctly to the SP farm. I checked the logs and right after running a Full crawl I get a bunch of these errors for most (if not all) users.

    SharePoint Portal Server User Profiles aer4e Medium Exception while updating properties for 'DOMAIN\User': Property: Description, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Description.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).
    SharePoint Portal Server User Profiles aer4e Medium Exception while updating properties for 'DOMAIN\User': Property: MailNickName, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: MailNickName.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).
    SharePoint Portal Server User Profiles aer4e Medium Exception while updating properties for 'DOMAIN\User': Property: Url, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Url.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).



    System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_DNLookup'. Cannot insert duplicate key in object 'upa.DNLookup'. The duplicate key value is (0d37852b-34d0-418e-91c6-2ah25af4be5b, User, ####).  The statement has been terminated.   

    SharePoint Portal Server User Profiles aei7b Medium UserProfileADImportJob:ImportDC -- Error Item scan: successes '0', failures '14', ignored '0', total duration '21919', external time in Profile '810', external time in Directroy '21072' (times in milliseconds) 68m20b9f-2483-a090-94lf-f88f79221545
    SharePoint Portal Server User Profiles aepvd Medium UserProfileADImportJob:ImportDC -- Data Import from DC 'company.com' at RootOU 'DC=contoso,DC=com' for UPA '81052f18-5d04-47b2-a956-e011bad51c0f' is 'complete'.

    SharePoint Portal Server User Profiles afoeh Medium UserProfileApplication.SynchronizationPostProcessing: Returned from IMPORTEXPORT_PostImportUserProperties 68m50a9f-2483-a090-94ef-f88f79221645
    SharePoint Portal Server User Profiles aepva Medium UserProfileADImportJob: Completed Data Import. 6Bw50a9f-2483-a090-94ef-f88f79221545

    High UserProfileApplication.DumpSynchronizationStatusToFile: Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Administration.UserProfileApplication.DumpSynchronizationStatusToFile().

    I have tried the usual - IIS reset, Timer service reset, Server reboot, and Stopping and restarting the USP service. Ran the SP wizard several times. No luck.

    Obviously I want to avoid to rebuild the service.

    Any help will be appreciated.

    We are running SharePoint server 2016 Patched up to August 2019 (16.0.4900.1000)

    2 x Win 2012 R2 servers (App + search)

    2 x Win 2012 R2 servers (WFE + Dist Cache) (Load balanced)

    1 SQL server clustered

    Thanks!

    2019년 10월 4일 금요일 오후 8:02

모든 응답

  • Hi _Rob_S_,

    To troubleshoot the issue, you could run the PowerShell commands one by one.

    1. Get the GUID of user profile service application by the PowerShell command

    Get-SPServiceApplication


    2. Get the user profile service application and set the user profile service application.

    $u = Get-SPServiceApplication -Identity userprofileGUID
    
    Set-SPProfileServiceApplication $u -GetNonImportedObjects $true
    
    #Here you will get the results for profiles 'IsImportedvalue = 0' from ProfileDB
    
    Set-SPProfileServiceApplication $u -PurgeNonImportedObjects $true
    
    #This cmdlet will mark the profiles for deletion and need MySiteCleanup job to delete those which are marked for deletion. If MySite is part of one user that added in missing profile, the same job will delete those MySites as well.


    3. Run Incremental profile import. Query following against ProfileDB database and we should get no results.

    select * from DNLookup where isimported !=1 

    #Make sure you have backup of profile database before running any queries against it.

    4. Run full profile Import once the above query returns no result.

    For more detailed information, refer to the article below.

    SP2013 ADImport | More than one DN specified for the same profile.

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    More reference:

    Set-SPProfile​Service​Application.

    https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/Set-SPProfileServiceApplication?redirectedfrom=MSDN&view=sharepoint-ps

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 7일 월요일 오전 2:25
    중재자
  • Thanks for the reply. 

    I saw this proposed solution somewhere else while doing my research, and I thought this wouldn't work since it doesn't seems to tackle the main issue i'm seeing. Also, we don't have the my site cleanup timer job enabled and we want to keep it that way. Nevertheless I tried this and like I thought, it didn't work. 

    After performing the recommended steps, when I do 'select * from DNLookup where isimported !=1 ' I get 0 results. 

    I still see the same error messages after starting either a Full or incremental sync:

    UserProfileApplication.DumpSynchronizationStatusToFile: Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Administration.UserProfileApplication.DumpSynchronizationStatusToFile().

    There is a cache miss for property 6106 in m_ProfileTypePropertyManager. Could not retrieve the property even after reset.

    Exception while updating properties for DOMAIN\user: Property: Description, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Description. 
    Exception while updating properties for DOMAIN\user: Property: Url, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Url. 
    Exception while updating properties for DOMAIN\user: Property: MailNickName, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: MailNickName. 

    2019년 10월 8일 화요일 오후 8:02
  • Hi _Rob_S_,

    To troubleshoot the issue, you could recreate the synchronization connections in the user profile service application.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 9일 수요일 오전 7:26
    중재자
  • I tried to recreate the synchronization connections. No luck. I am still getting the same errors. Needless to say, the users (that already exist in the database) don't seem to be getting their properties updated.

    Additionally, I checked logs on another SharePoint 2016 environment we have which synchronizes to the same AD in our domain; I am seeing the same errors.

    Exception while updating properties for DOMAIN\User: Property: Description, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Description.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).
    Exception while updating properties for DOMAIN\User: Property: MailNickName, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: MailNickName.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).
    Exception while updating properties for DOMAIN\User: Property: Url, Exception Microsoft.Office.Server.UserProfiles.PropertyNotDefinedException: Property Not Defined: Url.  An administrator must create this property in the Profile Administration tool.     at Microsoft.Office.Server.UserProfiles.UserProfile.get_Item(String strPropName)     at Microsoft.Office.Server.UserProfiles.UserProfile.GetProfileValueCollection(String propName)     at Microsoft.Office.Server.UserProfiles.UserProfile.BulkPropertiesUpdate(Int64 importExportId, Hashtable properties, String accountName).
    ProfileImportExportService.UpdateWithProfileChangeData: Uncaught exception for object '70d3df59-43k7-44ee-8420-ee2600b91678 (DOMAIN\User)' - System.InvalidOperationException: More than one DN specified for the same profile.     at Microsoft.Office.Server.UserProfiles.ProfileImportExportService.AddDNLookupTable(UserProfileApplicationProxy upaProxy, Guid partitionID, Int64 recordId, String objectType, String distinguishedName)     at Microsoft.Office.Server.UserProfiles.ProfileImportExportService.<>c__DisplayClass2a.<UpdateWithProfileChangeData>b__28(Int32 idx).

    What gets me the most is that we consistently get the errors for these properties "Description","MailNickName" and "Url". What are these properties? where do they come from? are they supposed to be out-of-the-box properties in SharePoint and we suddenly lost them? or are these mapped back to AD and they are not to be found in AD now?

    Thanks

    2019년 10월 9일 수요일 오후 3:37
  • It's getting worse. I assume that because I'm running several incremental and full sync crawls as I troubleshoot the issue, now several active users appear as 'Domain\user-DELETED-GUID' in the 'Manage User Profiles' console in CA.
    2019년 10월 10일 목요일 오후 3:37
  • Hi _Rob_S_,

    To troubleshoot the issue, I suggest you could delete and re-create the search service application. And delete and re-create the user profile service application.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 11일 금요일 오전 7:08
    중재자
  • That is a negative to rebuild.

    This is happening on more than one farm, so I think rebuilding the farm (or the service app(s) for that matter) is not a solution.

    I want to hear if anyone has any idea on what the properties (MailNickName, Description and Url) shown in the logs mean? or where they come from?

    2019년 10월 11일 금요일 오후 1:19
  • Hi _Rob_S_,

    The properties “Mail Nickname”, “Description” and “Url” are the AD properties.

    If you did not map the AD properties, you could create custom user properties to map the AD properties.

    If the type is string(Single Value), then you can select the AD property “Mail Nickname”.


    If the type is string(Multi Value), then you can select the AD properties “Description” and “url”.


    More references:

    AD Properties can be mapped to user property.

    SharePoint 2016: AD Import Profile Property Mappings aka: my profiles are missing email address.

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 14일 월요일 오전 7:26
    중재자
  • Thanks for your assistance Sara.

    It is clear to me that these particular properties from AD are not currently mapped into our SharePoint UP Properties. And it make sense to try an map them. My question is why? what changed? Up until this issue arose I've never heard of these properties before. And as far as I know we are not actively using these user properties either in AD or SharePoint (I mean like actively populating content on them).

    Did Microsoft change something recently and now we need to 'manually' map these properties ourselves? I am "ok" if this is the case, but i'd like to understand what happened. It's odd that I can't find more posts online of other organizations having the same issue. Is there any documentation about this from Microsoft? I can't find any.

    Thanks!

    2019년 10월 15일 화요일 오후 2:01
  • Hi _Rob_S_,

    Did you install SharePoint updates or Microsoft updates in your SharePoint environment?

    Microsoft does not change the user profile service application.

    I suppose there is something error in your SharePoint environment.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 16일 수요일 오전 7:58
    중재자
  • We noticed this issue a few weeks ago, and until then we were up to the August 2018 CU. After noticing the issue we updated SharePoint up to August 2019 (hoping a later update would resolve the issue - obviously with no luck). We had been having regular monthly Windows server updates, but I cannot say exactly if one of those updates cause this since we cannot really pin point when the issue really started.

    As further troubleshooting step I deleted one of the users that become marked for deletion (appears as Profile Missing from import in Manage User Profile Console). After doing this I ran [several] full and incremental crawls and I can't get the user back (to SharePoint) even though it exists in AD.

    2019년 10월 17일 목요일 오후 1:23
  • Hi _Rob_S_,

    From my side, I am afraid that we cannot get the root the cause of the issue.

    If you want to know the root cause of the issue, you could submit a support ticket.

    And if the reply is helpful to you, you could mark the reply as answer. Thanks for your understanding.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.



    2019년 10월 18일 금요일 오전 3:03
    중재자
  • As an update - I added the "missing" properties that SharePoint complains about in the Logs (Description, Url, MailNickName). After this the errors for these specific properties won't show anymore (Exception while updating properties for 'DOMAIN\User': Property:MailNickName); however the profile sync still fails.

    I still get these in the logs:

    UserProfileApplication.DumpSynchronizationStatusToFile: Unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Administration.UserProfileApplication.DumpSynchronizationStatusToFile().

    I opened a case with Microsoft Support. I will come back and leave an update on how we resolved this.

    2019년 10월 21일 월요일 오후 1:25
  • Hi _Rob_S_,

    If you have any update of the issue, you could share in the forum.

    It will help others have the same issue.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    2019년 10월 23일 수요일 오전 7:35
    중재자
  • Hi there,

    I also had this issue in one environment and could solve it. I tackled the issue down to records in the UserProfile database, table DNLookup. The UPA was migrated from SP2013 and had entries with DN values like "MV={guid}" because formerly the FIM was used in SP2013 that is not available any more.

    Truncating the whole table and starting full import through Central Admin filled the table again with the actual AD data. All Profile data was updated successfully after that.

    WARNING: Modifications to this database are not supported by Microsoft! Backup the database right before to have a fallback!


    // Tried and true method for weather forecasting - random numbers. String weather = (new Random()).Next(2)==0?"rainy":"sunny";

    2019년 11월 4일 월요일 오후 12:14