The Specified User or Domain Group Was Not Found

I was seeing some odd behaviour on a client site a while back. Below is a list of the various issues I was seeing.

 
 

  1. When trying to insert a link into a web page

     
     

    I was seeing the following error.

     
     

  2. Also in the ULS, I was seeing the following issue.

    System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated

  3. Additionally, all Publishing sites were failing (I couldn’t even go to a brand new site collection I just created, after having activated the publishing site collection feature)

 
 

It turns out the issue was that I had used the wrong accounts for the publishing accounts in PowerShell. See below.

 
 

I had used these accounts

$w.Properties[“portalsuperuseraccount”] = “i:0#.w|domain\spsuperuser”

$w.Properties[“portalsuperreaderaccount”] = “i:0#.w|domain\spsuperreader”

Instead of these (which were the accounts the client had actually supplied)

$w.Properties[“portalsuperuseraccount”] = “i:0#.w|domain\sp13_superuser”

$w.Properties[“portalsuperreaderaccount”] = “i:0#.w|domain\sp13_superreader”

 
 

As soon as I corrected these, all the issues went away.

 
 

Strangely the issue I was seeing in point #1 above was failing on SP2013 on a non-publishing site. The lesson is, always use the correct accounts. 🙂