You may get the above error when trying to create the portal for FIM or MIM in SharePoint 2013, it seems like MS ay have messed around with the numbering of the templates……in the powershell script to create the web site try changing “STS#1” to “STS#0”
$t = Get-SPWebTemplate -compatibilityLevel 14 -Identity "STS#0"
It swaps the template from a blank site to a teams site which is has the features required for the FIM/MIM portal.
You also get this if you have not yet run the product configuration wizard, so if you have configured via command line then before the above section run the config wizard and that installs the templates etc. and sets up the config site.