Showing posts from February, 2013

SharePoint 2013 Workflow gets canceled automatically

Hi, I was struck with the error of Workflow gets canceled automatically. Scenario was : A new SP 2013 installation, one server with SP, WF, etc and the other is simply SQL Server. Went through the installation steps for Workflow including the powershell bits. In designer, I am able to create a simple workflow and select 2013 as the type. When the workflow is run, is shows internal status is canceled and has the following error text below. RequestorId: 55c6990b-c4a6-352c-4a5b-449fc1aecac4. Details: System.ApplicationException: HTTP 401 {"x-ms-diagnostics":["3001000;reason=\"There has been an error authenticating the request.\";category=\"invalid_client\""],"SPRequestGuid":["55c6990b-c4a6-352c-4a5b-449fc1aecac4"],"request-id":["55c6990b-c4a6-352c-4a5b-449fc1aecac4"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"SPRequestDuration":["61"],"SPIisLatency":["1&

SharePoint 2013 Taxonomy import using .csv and Setting site navigation to use taxonomy using PowerShell

Now requirement to import taxonomy from .csv file using PowerShell as well set taxonomy as site navigation with url. 1. Create .csv file 2. Create new script and paste below code. Param( [string] $siteUrl = $(throw "Error: Parameter siteUrl is required"), [boolean]$emptyfirst ) ##Variables that should not be edited $termsetName="My Navigation" function CreateTerm( $parent, $name, $url ) { Write-Host "Adding term $($parent.Name) -> $name" $term = $parent.CreateTerm("$name", 1033) $term.IsAvailableForTagging = $false $term.SetLocalCustomProperty("_Sys_Nav_ExcludedProviders", '"CurrentNavigationTaxonomyProvider"') $term.SetLocalCustomProperty("_Sys_Nav_SimpleLinkUrl", $url) #$term.SetLocalCustomProperty("tIME", $url) return $term } function GetTerm($termName, $parent) { $termName = [Microsoft.SharePoint.Taxonomy.TaxonomyI

SharePoint 2013 TermSet with PowerShell

Create new script with following code: $session = Get - SPTaxonomySession - Site "Your site Url" $termStore = $session . TermStores [“ Managed Metadata Application ”] - change your managed metadata service name $group = $termstore . CreateGroup (“ My New Group ”) $group . Description = "My Term Group" $termStore . CommitAll () $termSet = $group . CreateTermSet (“ My TermSet ”, 1033 ) $termSet . Description = “ My TermSet ” $termSet . IsAvailableForTagging = $true $termSet . IsOpenForTermCreation = $true $termStore . CommitAll () To enable the term set for navigation, i.e    "Use this Term Set for Site Navigation"   use following code to make it enabled. $navigationSet = $group . CreateTermSet ( $termsetName ) $navigationSet . SetCustomProperty ( "_Sys_Nav_IsNavigationTermSet" , "True" ) $navigationSet . SetCustomProperty ( "_Sys_Nav_AttachedWeb_SiteId" , $site . ID . ToString