{"id":2996,"date":"2016-11-23T23:00:20","date_gmt":"2016-11-23T23:00:20","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=2996"},"modified":"2016-11-24T01:08:27","modified_gmt":"2016-11-24T01:08:27","slug":"setting-up-sharepoint-foundation-2013-for-mim-2016-sp1","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/setting-up-sharepoint-foundation-2013-for-mim-2016-sp1","title":{"rendered":"Setting up SharePoint Foundation 2013 for MIM 2016 SP1"},"content":{"rendered":"<p>It occurred to me while fighting with this over the last couple of days that I have never installed the MIM Portal in anything other than a lab. FIM Portal yes, but then only on SharePoint 2010 (even after 2013 was available, because it was a heck of a lot easier). While I know MIM 2016 SP1 ican now run on Windows Server 2016 and SharePoint 2016, the customer&#8217;s SOE is still the earlier versions. Also I had (perhaps too optimistically) assumed I&#8217;d be better off with Sharepoint 2013 because of <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-identity-manager\/deploy-use\/prepare-server-sharepoint\">this walkthrough<\/a>.<\/p>\n<p>There are a few problems with following this walkthrough, which is written for a lab, in\u00c2\u00a0a customer installation. Domain Admin accounts are used, it uses server names rather than aliases, and the SharePoint site is installed on port 82 for some reason. So I thought it worthwhile writing up my steps for reference.<br \/>\n<!--more--><\/p>\n<h3>Create Service Account<\/h3>\n<p>Among the service accounts you create for the solution is one for SharePoint &#8211; let&#8217;s call it svc_MIM_SharePoint. We did not want to put it in local Administrators on the server, but I had ensured it had:<\/p>\n<ul>\n<li>Log on as a Service<\/li>\n<li>Log on as a Batch Job<\/li>\n<\/ul>\n<p>What we found out after struggling with &#8220;An unexpected error has occurred&#8221; on loading the SharePoint Central Administration site is that you also need:<\/p>\n<ul>\n<li>Impersonate a client after authentication<\/li>\n<\/ul>\n<p>Thanks to this blog poster for pointing us towards this fix:\u00c2\u00a0<a href=\"https:\/\/blogs.msdn.microsoft.com\/brian_farnhill\/2015\/01\/15\/system-io-fileloadexception-for-system-servicemodel-dll-in-sharepoint-2013\/\">https:\/\/blogs.msdn.microsoft.com\/brian_farnhill\/2015\/01\/15\/system-io-fileloadexception-for-system-servicemodel-dll-in-sharepoint-2013\/<\/a><\/p>\n<h3>DNS, SPNs<\/h3>\n<p>I have seperate DNS names for the MIM Service and the MIM Portal &#8211; I think this is a good practise because the customer might want to change the Portal address and\u00c2\u00a0it won&#8217;t effect anything talking directly to the Service.<\/p>\n<ul>\n<li>iamportal.mydomain.net<\/li>\n<li>iamservice.mydomain.net<\/li>\n<\/ul>\n<p>The following SPNs were created (linked to the MIM Service service account):<\/p>\n<p style=\"padding-left: 30px;\">setspn -S FIMService\/iamservice MYDOMAIN\\svc_MIM_Service<br \/>\nsetspn -S FIMService\/iamservice.mydomain.net\u00c2\u00a0MYDOMAIN\\svc_MIM_Service<br \/>\nsetspn -S HTTP\/iamportal MYDOMAIN\\svc_MIM_SharePoint<br \/>\nsetspn -S HTTP\/iamportal.mydomain.net\u00c2\u00a0MYDOMAIN\\svc_MIM_SharePoint<\/p>\n<p>And constrained Kerberos delegation applied:<\/p>\n<ul>\n<li>svc_MIM_Service &#8211;&gt; FIMService<\/li>\n<li>svc_MIM_SharePoint &#8211;&gt; FIMService<\/li>\n<\/ul>\n<h3>Install Pre-Requisites<\/h3>\n<p>As is typically the case in a customer environment, there was no internet access from the server so I had to do this manually. The pre-reqs for SharePoint 2013 are covered in <a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/2765260\">this KB article<\/a>. I did not need all of them on Windows Server 2012 R2, the ones I did need were:<\/p>\n<ul>\n<li>The IIS options as installed by the scripts provided in the <a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/2765260\">KB article<\/a>,<\/li>\n<li><a id=\"kb-link-9\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkId=254815\" target=\"_self\">Microsoft SQL Server 2008 R2 SP1 Native Client<\/a>\n<ul>\n<li>I tried installing the SQL 2012 Native Client which is part of the SQL SDK. It worked for the MIM Sync service (on another server) but the SharePoint 2013 installation wouldn&#8217;t accept it,<\/li>\n<\/ul>\n<\/li>\n<li><a id=\"kb-link-10\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkID=226830\" target=\"_self\">Windows Identity Foundation (KB974405)<\/a><\/li>\n<li><a id=\"kb-link-11\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkID=224449\" target=\"_self\">Microsoft Sync Framework Runtime v1.0 SP1 (x64)<\/a><\/li>\n<li><a id=\"kb-link-13\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?linkid=252368\" target=\"_self\">Windows Identity Extensions<\/a><\/li>\n<li><a id=\"kb-link-16\" href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=29306\" target=\"_self\">Microsoft WCF Data Services 5.0 for OData V3<\/a><\/li>\n<li><a id=\"kb-link-14\" href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkID=219568\" target=\"_self\">Microsoft Information Protection and Control Client (MSIPC)<\/a><\/li>\n<li><a id=\"kb-link-12\" href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=27115\" target=\"_self\">Microsoft AppFabric 1.1 for Windows Server<\/a>\n<ul>\n<li>MUST be installed from the comand line like this:<\/li>\n<\/ul>\n<p>.\\WindowsServerAppFabricSetup_x64.exe \/i CacheClient&#8221;,&#8221;CachingService&#8221;,&#8221;CacheAdmin \/gac<\/li>\n<li><a id=\"kb-link-17\" href=\"http:\/\/support.microsoft.com\/kb\/2671763\" target=\"_self\">Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB 2671763)<\/a><\/li>\n<\/ul>\n<h3>Install SharePoint Foundation<\/h3>\n<p>Some extra notes in addition to\u00c2\u00a0the <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-identity-manager\/deploy-use\/prepare-server-sharepoint\">walkthrough<\/a>:<\/p>\n<ol>\n<li>I always create a MIM Administrator account and install SharePoint and MIM using it. It is\u00c2\u00a0<em>not<\/em> a Domain Admin (as suggested by the walkthrough), but it is a local Administrator on the server.<\/li>\n<li>Select\u00c2\u00a0the &#8220;Complete&#8221; option,<\/li>\n<li>Allow the wizard to run,<\/li>\n<li>Select &#8220;Create a new server farm&#8221; &#8211; note this is also what you select when installing a second MIM Portal server, as each runs independantly, and they just share the FIMService database,<\/li>\n<li>The database server is the shared SQL server I have for the other solution databases, so I enter it&#8217;s servername\\instance,<\/li>\n<li>I modified the default database name to specificy the server: SharePoint_Config_<em>MIMServerName<\/em>,<\/li>\n<li>Then it&#8217;s just a matter of clicking through the remaining dialogs.<\/li>\n<\/ol>\n<p>At the end of this the SharePoint Central Administration page should load. Login using your current account (should be the MIM Administrator account) and check that the page loads. If the page doesn&#8217;t load or you get an error there is no point pushing on &#8211; this needs to work.<\/p>\n<h3>Configure SharePoint<\/h3>\n<p>I basically followed the script provided in the\u00c2\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoft-identity-manager\/deploy-use\/prepare-server-sharepoint\">walkthrough<\/a>, apart from configuring the SharePoint site on port 80, and setting the MIM Administrator account as the only owner.<\/p>\n<pre>#Initialize values required for the script\r\n$URL = \"iamportal.mydomin.net\"\r\n$DBName = \"SharePoint_Config_MIMServer\"\r\n$DBOwner = \"MYDOMAIN\\svc_MIM_SharePoint\"\r\n$MIMAdmin = \"MYDOMAIN\\svc_MIM_Admin\"\r\n\r\n## Create Web Application\r\n$dbManagedAccount = Get-SPManagedAccount -Identity $DBOwner\r\nNew-SpWebApplication -Name \"MIM Portal\" -ApplicationPool \"MIMAppPool\" -ApplicationPoolAccount $dbManagedAccount -AuthenticationMethod \"Kerberos\" -Port 80 -URL $URL\r\n\r\n## Create SharePoint Site Collection\r\n$t = Get-SPWebTemplate -compatibilityLevel 14 -Identity \"STS#1\"\r\n$w = Get-SPWebApplication $Url\r\nNew-SPSite -Url $w.Url -Template $t -OwnerAlias $MIMAdmin -CompatibilityLevel 14 -Name \"MIM Portal\"\r\n$s = SpSite($w.Url)\r\n$s.AllowSelfServiceUpgrade = $false\r\nif ($s.CompatibilityLevel -eq 14) {write-host \"Site Collection creation successfully\"}\r\nelse {throw (\"Site collection has been created at the wrong compatability level. Expected 14, got \" + $s.CompatibilityLevel)}\r\n\r\n## Disable jobs\r\n$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;\r\n$contentService.ViewStateOnServer = $false;\r\n$contentService.Update();\r\nGet-SPTimerJob hourly-all-sptimerservice-health-analysis-job | disable-SPTimerJob\r\n\r\n## Check site opens\r\nstart-process \"http:\/\/iamportal.mydomin.net\" \r\n<\/pre>\n<p>At the end of this the new site should be opened and you may be prompted to login. Check that the empty site opens fine &#8211; then make sure you follow the step to add the site to Local Sites in the IE security settings.<\/p>\n<p>You then need to make sure you&#8217;ve got Kerberos set up properly &#8211; you should be able to close all your browsers, restart IIS, and then open http:\/\/iamportal.mydomain.net\u00c2\u00a0<em>without being prompted to login<\/em>. Only when this happens are you ready to proceed with the MIM Service and Portal installation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It occurred to me while fighting with this over the last couple of days that I have never installed the MIM Portal in anything other than a lab. FIM Portal yes, but then only on SharePoint 2010 (even after 2013 was available, because it was a heck of a lot easier). While I know MIM&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[73],"tags":[],"class_list":["post-2996","post","type-post","status-publish","format-standard","hentry","category-mim-2016-sp1"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-Mk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=2996"}],"version-history":[{"count":13,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2996\/revisions"}],"predecessor-version":[{"id":3009,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2996\/revisions\/3009"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=2996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=2996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=2996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}