{"id":1112,"date":"2012-11-13T09:19:06","date_gmt":"2012-11-13T09:19:06","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1112"},"modified":"2024-04-26T12:44:00","modified_gmt":"2024-04-26T12:44:00","slug":"when-users-cant-access-a-taxonomy","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/when-users-cant-access-a-taxonomy\/","title":{"rendered":"When users can\u2019t access a taxonomy"},"content":{"rendered":"<h2>When users cannot access a MMS taxonomy<\/h2>\n<p>The Managed Metadata Service is great; but what do you do when users can\u2019t view some taxonomy entries? This occurs when the user does not have access to the HiddenTaxonomyList, native to each Site Collection.<\/p>\n<p>You can view the list using SharePoint Manager from CodePlex, navigating the Object Model, or simply by modifying this URL to reflect your site collection URL:<br role=\"presentation\" data-uw-rm-sr=\"\" \/>http :\/\/SharePoint\/sites\/SiteCollection\/Lists\/TaxonomyHiddenList\/AllItems.aspx where \u201chttp :\/\/SharePoint\/sites\/SiteCollection\u201d is replaced with your site collection URL.<\/p>\n<p>I recently found a situation where permissions by default were empty. Best would be to allocate all Authenticated users access. However what does one do if there are many site collections within a given Web Application? Here\u2019s a script that will iterate through Site Collections, and grant the access:<\/p>\n<pre lang=\"php\"> $WebApp = \"http :\/\/SharePoint\" #replace with your own web app\r\n$webapp = get-spwebapplication $webapp\r\n \r\nfunction AddPerm ([Microsoft.SharePoint.SPList] $TargetObj, [string] $RoleValue, [string] $RoleGroup)\r\n{ #SPWeb is implied and not passed as parms for efficiency!\r\n    if ((!$RoleValue) -or (!$RoleGroup))\r\n    {\r\n    return; #race to be efficient on NullOp\r\n    }\r\n    try\r\n    {\r\n                $user = $SPWeb.ensureuser($RoleGroup)\r\n                $roledef = $SPWeb.RoleDefinitions[$RoleValue]\r\n                $roleass = New-Object Microsoft.SharePoint.SPRoleAssignment($user)\r\n                $roleass.RoleDefinitionBindings.Add($roledef)\r\n \r\n                $TargetObj.RoleAssignments.Add($roleass)  \r\n    }\r\n    catch\r\n    {\r\n    Write-Host -ForegroundColor DarkRed \"ERR: Can't Assign $($RoleGroup)\"\r\n    }\r\n}\r\n \r\nfor ($i=0; $i -lt $WebApp.Sites.Count; $i++)\r\n{\r\n    $site=$webapp.Sites[$i];\r\n    $SPWeb=$site.rootweb;\r\n    $list = $SPWeb.Lists[\"TaxonomyHiddenList\"]\r\n    addPerm $list \"Read\" \"SharePoint NT Authenticated Users\"\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When users cannot access a MMS taxonomy The Managed Metadata Service is great; but what do you do when users can\u2019t view some taxonomy entries? This occurs when the user does not have access to the HiddenTaxonomyList, native to each Site Collection. You can view the list using SharePoint Manager from CodePlex, navigating the Object [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":1114,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-1112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1112"}],"version-history":[{"count":2,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1112\/revisions"}],"predecessor-version":[{"id":1116,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1112\/revisions\/1116"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1114"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}