SharePoint Experts, Information Architects, Expert Witness

We provide consulting in a broad array of business and technology from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. Specialists in Microsoft, we are a premier provider of SharePoint Expertise (including 2016 and Office 365). We also provide Expert Witness/Legal Expert in eDiscovery, source discovery, patent infringement, piracy and more! We also have established SICG DLDS s.a. - our counterpart in Costa Rica that specializes in water systems (http://www.crwatersolutions.com) - Contact me direct: david_sterling@sterling-consulting.com or call 704-873-8846 x704.

Search This Blog

Monday, June 19, 2017

SharePoint Event ID 5586 - Target Principal name is incorrect. Cannot generate SSPI context.

Deploying a solution to SharePoint, it seemed to hang for a really long time. I ended up stopping the deployment to see what was up. Immediately thereafter, I could no longer connect to SharePoint at all.

In the Windows Application Event Log, I found multiple Event ID 5586 entries - basically saying "The target principal name is incorrect".

After a few hours of searching, I found one solution here:

http://www.jrjlee.com/2013/01/the-target-principal-name-is-incorrect.html *

* Note that he doesn't indicate that you have to adsiedit.msc to get to the entry (a little headscratching to figure that out).

Some say it worked for them, but it definitely did not work for me.

For one, there were no MSSQLSvc entries. For two, removing the RestrictedKrbHost entries condition went from bad to worse (new error: Unable to login to untrusted domain). I restored the RestrictedKrbHost entries just fine so I tried adding the MSSQLSvc entries and got "Name is not unique".

The final one that worked for me was:
1) Opened adsiedit.msc (Run as administrator)
2) Right clicked on the server entry and clicked Refresh
3) Opened AD Users & Computers, right clicked on the account running SQL Services and clicked Unlock Account.

Hat tip to David Murdoch's post *:

http://www.davidmurdoch.com/2014/10/06/the-target-principal-name-is-incorrect-cannot-generate-sspi-context/

Note: his blog incorrectly says "Refresh" from Active Directory Users and Computers - you actually have to use adsiedit.msc.

Sunday, June 18, 2017

Event ID 6398 SharePoint User Profile Synchronization


Having seen this myself a number of times (and sick of having to look for the answer), there is an error that occurs in the User Profile Sync - Event ID 6398 - in the Event Viewer it looks like this:


Notice that the error is every minute! This will certainly fill up the logs!

The issue is quite simple - there are many fixes but turns out the problem in simply the Forefront Identity Manager Service is not running (or could be the Sync). Open Administration > Services (or use Run and type in services.msc) and locate the Forefront Identity Services:


Simply start the service(s) (right click and select Start). I am not sure what causes it to stop periodically but in this state, User Profile sync errors will continue frequently,.

Hat tip to this post:
https://social.technet.microsoft.com/wiki/contents/articles/24496.sharepoint-2013-event-6398-the-execute-method-of-job-definition-microsoft-office-server-userprofiles-userprofileimportjob-threw-an-exception.aspx

Saturday, June 3, 2017

Central Admin - Something Went Wrong - Access Denied

Had a client that was very upset having problems accessing things in Central Administration (often complainer but that's for another post). Reported 'items missing' in CA menus and when trying to retract a solution, kept getting:

Note the key element here: Access denied.

The issue is quite simple - they were not using the "Run as administrator" option when starting CA. There is a way to fix this permanently too (from another one of my posts).

Click Start then right click on the Central Administration icon and select "Open file location":

Right click on the CA link and select Properties:


Click the Advanced... button - click the checkbox next to "Run as administrator" and click OK:


Note that this ONLY applies to the icon - if you add CA to your startup in IE/Chrome/etc., that will still open without the proper permissions.


Tuesday, May 30, 2017

ASP Event ID 1309 SharePoint On-Premise 2016 Error Creating Lookup Field

This event is pretty standard for any 'non-handled' SharePoint Error - this one happens to be related to the inability to create a Lookup field. I had been working with a few apps installing/uninstalling. Suddenly when trying to create a Lookup Field, I get the innocuous ASP Event ID 1309. Looking into the error (you have to read it carefully), I found:

Feature '6b744ecb-82fc-4896-a981-1ad8dc5c47c2' for list template '10000' is not installed in this farm.

I had to check and it only affected one site - not happy about the time I spent on it but it appears that one app had installed a new List using that ID. Deleted the list and emptied the recycle bin. Returned to the site and it Crashed! It actually took a reboot to fix.

You be careful out there!

Monday, May 22, 2017

Office 365/SharePoint Online Content Organizer

I noticed in early May 2017 that the SharePoint Online Content Organizer cannot reliably use "Send to" a different site.

Though the send to locations were correctly created in Admin > Records management and was heavily tested (and seemed to work), oddly the 'location' selection started to 'disappear' when attempting to create Content Rules.

This went from bad to worse when already established rules began failing - returning either 'an error has occurred' or worse, appearing to work but leaving the document(s) in the original Drop Off library.

I reported and demonstrated this multiple times to Microsoft - at this time, there is no fix available.

I will post if the issue is resolved or I get a definitive answer.



Office 365/SharePoint Online Information Management Policies

Be aware - as of early May 2017, the Information Management policies within SharePoint Online are NOT working. After multiple tests, a few things of note:

1) The job to process IM policies doesn't always run on a fixed schedule - I have seen posts where they believe it only runs once a week (!). However, in my testing, I found that to be off; in my tests it took over 2 weeks (approximately 15 days).

2) Issue has been reported to Microsoft.

3) Response from Microsoft - they broke it, not sure when it will be fixed and have disabled the functionality (however, it can still be set up in Online so they didn't disable the entire feature).

I'll post back if I ever hear back.

Saturday, April 15, 2017

Getting the Web ID for a site (SharePoint & Online)

There's often a need to find the Web ID of a SharePoint site - specifically when exporting web parts (as shown in this article https://chuvash.eu/2014/09/19/export-any-web-part-from-a-sharepoint-page/).

NOTE: I don't take credit for these, these are a summary of what's out there!

So getting the ID can be done a number of ways - first, using the "API" (if using SharePoint Online, authenticate to the site first):

https://<site>/_api/web/id

For Online:

https://<site>.SharePoint.com/_api/web/id

subsite:

https://<site>.sharepoint.com/sites/subsitecoll/_api/web/id

Next using on premise PowerShell:

$site = Get-SPSite  http://<site & port>
$web = $site.AllWebs["<name of site>"]
$web.ID

In SharePoint Online using the SharePoint Online Management Shell:

Connect-SPOService -URL https://<org>-admin.sharepoint.com

Enter your credentials, then enter:

Get-SPOSite -Identity https://<site>.SharePoint.com
Next connect to the site:

Connect-SPOSite -Url "https://<site>.sharepoint.com/" -Credential "<someone@org.com>"

If you omit -Credential, you will be prompted (the credential is your EMAIL address <someone@org.com>, not the AD account domain\account) but better to use this:

$username = "<someone@org.com>"
$password = "<password>"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(ConvertTo-SecureString $password -AsPlainText -Force)
Connect-SPOSite -Url "https://<site>.sharepoint.com/" -Credential $cred


Then finally for the top level web:

Get-SPOWeb -Identity "/"

For a subsite, use the name:

Get-SPOWeb -Identity "News"

Get-SPOWeb will list out details of the web - just look for the "Id" column.

Note - if using a Subsite under /Sites/, you have to connect to that site collection (instead of https://<site>.SharePoint.com, you use https://<site>.SharePoint.com/sites/subcollection".

Another way is through the URL. Open the site/web you want and open Site Settings. Click either the Site Content and Structure or Content and Structure Logs link. Click on the web in question and select the drop down then select General Settings - cut and paste the URL into notepad - you will find the ID in the query string after SPWeb (%3A = : - see here http://www.degraeve.com/reference/urlencoding.php). Here's snip of the URL where the SPWeb can be found:

FSmtContext%3DArea%3A%3FSPWeb%3A1b43b8ac-973e-4291-a268-fc9c0ecb4eb3%3A%26SmtContextExpanded%


Yet another is using jQuery - found on the MSDN site: 

<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script><script type="text/javascript">
function GetSPWebID()
{
        url = document.getElementById("field1").value;
        var webId;
  
 var soapEnv =
    "<?xml version='1.0' encoding='utf-8'?>\
  <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>\
    <soap:Body>\
    <GetWeb xmlns='http://schemas.microsoft.com/sharepoint/soap/'>\
    </GetWeb>\
    </soap:Body>\
    </soap:Envelope>";
  $.ajax({
      url: url + "/_vti_bin/SiteData.asmx",
      beforeSend: function(xhr) {xhr.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetWeb");},
      type: "POST",
      data: soapEnv,
      dataType: "xml",
      async: false,
      complete: function(xData, status) {webId = $(xData.responseXML).find('WebID').text();},
      contentType: "text/xml; charset='utf-8'"
    });
 document.getElementById("field2").value=webId;
}</script>Root Web URL: <input id="field1"/><br/>WebID: <input id="field2"/> <br/><br/><button onclick="GetSPWebID()">Get Web ID</button> 
//nonsense comment to keep IE7 from truncating MSDN code