Thursday, December 13, 2018

Sharepoint 2016 User profile sync unable to update manager field



I was migrating a User profile from SharePoint 2010 to SharePoint 2013 and then to SharePoint 2016 . During the process of migration I did decide to leave out the sync and social DB , as we wanted the   new social features available in SharePoint 2016 and we decided not having to migrate the social and sync DB from SharePoint 2010 would be a cleaner approach .

As per the Microsoft article I did migrate the User profile DB and the MySite DB through Data base upgrade process. Everything did migrate all fine and I did opt for "Active Directory Import" to configure the new Sync in SharePoint 2016 . I was able to create a custom property to import the "Employee ID " from AD and post completion of Full sync ,I was able to see the Employee ID property in user's profile .

Strangely I noticed that the manager field was not being updated , yes it did have the old values carried over from SharePoint 2010 , but if the manager field was updated in AD , it was not being synced to SharePoint . Did restart the service and triggered full sync of user profile on few occasion , but this did not resolve the issue .

But below steps finally synced the manager field from AD to SharePoint 2016 .


  1. Clicked "Configure Synchronization Settings" in central admin of SharePoint 2016
  2. Since I had configured the "  Active Directory Import " to sync the data from AD , this option was selected .
  3. Select the "Enable External Identity Manager" 
  4. click OK
  5. Now get back to the same screen ""Configure Synchronization Settings"
  6. But this time select the right setting "Use SharePoint Active Directory Import"
  7. Click OK
  8. Trigger the "Full Sync"

This resolved the issue and manager field for all the users were updated .

Note : Manager property should not be configured with any import filed in "Manage User Property" this field has to be kept blank , only then the SharePoint 2016 would sync  the data from AD .

Previously in SharePoint 2010 , you had to map the SharePoint "manager" user property with "manager" field in "Property mapping for synchronization"

Friday, September 21, 2018

SharePoint 2010 to SharePoint 2016 MySite blog migration issue



While we were trying to migrate the User profile DB along with the Mysite from SharePoint 2010 to SharePoint 2016 by having a hop at SharePoint 2013 , we faced the below issue

It worked all fine in SharePoint 2013 , but had some issue in SharePoint 2016

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe

On closer look at the web.config and logs , I found that the entries were missing for 14.0.0.0 version in Sharepoint 2016 , fix was to add below entries in web.config file which was hosting the Mysite webapplication

<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogAdminWebPart" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogLinksWebPart" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogMonthQuickLaunch" Safe="True" SafeAgainstScript="True" />
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="BlogYearArchive" Safe="True" SafeAgainstScript="True" />

Issue seems to be either the upgrade had failed in SharePoint 2013 or SharePoint 2016 , hence failed to upgrade the default webpart for blogs , or MS forgot to update their webconfig file 




Thursday, June 21, 2018

SharePoint 2016 search crawl issue

I had the below issue in our SharePoint 2016 farm , for some reason it was working fine until a patch was applied and the server was rebooted . The patch had nothing to do with it though

Issue 

1)Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled.

2)Crawling of this item failed, HTTP 504: Gateway Timeout. Try accessing the item using a browser on the crawl machine. If URL is accessible through the browser, it is possible that the crawl targets for that host are not configured correctly. Please contact the Host Administrator for assistance
Error refers to disabling the loop back but this has already been done , but we can remove the registry entry and try again though , also we could try applying the latest patch . But all this would require change in registry and reboot of server .

First error message was seen for the HTTP site and the second error message was seen for the HTTPS site

1)We did try to add the crawl rule and assign certificates to crawl the HTTPS URL , but nothing resolved the issue
2)But as a standard procedure , you will need to follow the steps in below link to make sure you have the right configuration for search

https://social.technet.microsoft.com/wiki/contents/articles/25863.access-is-denied-verify-that-either-the-default-content-access-account-has-access-to-this-repository-or-add-a-crawl-rule-to-crawl-this-repository.aspx

3)I had all the configuration set correctly , but it still would not work
Finally by clearing the proxy did the magic

below  are the script to be run as admin on the SharePoint server which is defined as crawler

netsh winhttp show proxy
netsh winhttp reset proxy
Net stop Osearch16
Net start Osearch16

Saturday, December 23, 2017

Sharepoint framework(SpFx) gulp error -gulp serve cannot find module semver

If you get an error while trying to kick start your first SharePoint Framework solution


"gulp serve cannot find module semver"


Go to terminal and type in the below command


"npm install gulp-cli -g"


This should probably solve your issue

Tuesday, December 5, 2017

SQL data connection issue on SharePoint 2016 hosted on SQL 2016 and Windows 2016

We were trying few test migration and built our SharePoint server 2016 on top of SQL 2016 and windows 2016 . We did want to try SSRS connection after the test migration from SharePoint 2010 to SharePoint 2016 .

We were having issue with the data connection , even if we created new .rsds file and tried to connect to a DB which was hosted on SQL 2008 R2 we were receiving the error as below

"A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"

 I spent long hours trying to figure out if it was SharePoint issue or SSRS configuration issue even I did double check if Office online server was causing the issue , finally was able to back track the issue was with the SQL component on Windows 2016 OS . As per the new standard the SQl client hosted on Windows 2016 would not allow TLS1.0 communication and the minimum it supports in TLS1.2 .

Found a article which was put accross by Microsoft regarding the same and by installing a patch on SQL 2008 R2 and adding the necessary registry key , SQL as well as Sharepoint was able to communicate to legacy version of SQL instance .

Link --> https://blogs.msdn.microsoft.com/sqlreleaseservices/tls-1-2-support-for-sql-server-2008-2008-r2-2012-and-2014/