Friday, May 6, 2016

Mapping SharePoint 2013 Crawled Property to Managed Property for Search-driven Applications

Search-driven applications are a great way to utilize the powerful SharePoint search features to surface content. SharePoint offers sleek methods to extend search to create search-based solutions and applications.
When you use the Search Results web part to display the search-driven content, you might want to sort or filter the search results. These results can be sorted and filtered on managed properties. However, you have your data fields already in-use as crawled properties. To get the Search Results web part to work with your crawled properties, you need to map those crawled properties to managed properties. You can do this from the Site Collection Settings by going to Search Schema.
If you want to do this programmatically, the following PowerShell script will do it for you.

How to use the script:

  • Save the script as “MapCrwlProp2MgdProp.ps1”
  • Open PowerShell and go to the directory where the script is saved.
  • Modify the parameters and run the following command “.\MapCrwlProp2MgdProp.ps1 -CrwProp “Crawled Property” -MgdProp “ManagedProperty” -DataType 2”
The script checks if the Managed Property exists or not. If it doesn’t exist, it creates the managed property and maps it to the crawled property, simple eh!

<# Example: .\MapCrwlProp2MgdProp.ps1 -CrwProp "Crawled Property" -MgdProp "ManagedProperty" -DataType 2 
Parameters: DataType 1 - Text
2 - Integer
3 - Decimal
4 - Date & Time
5 - Yes/No
6 -
Double precision float
7 - Binary 
CrwProp - Crawled Property 
MgdProp - Managed Property 
Variables:
$SSAName = Search Service
Appication Name. By default, it is "Search Service Application". If it is different in your case, please change it in the script.
$ManagedMetadataCategory = Managed Metadata Category. By default, it is "SharePoint". If it is different in your case, please change it in the script. #>

Param(
[Parameter(Mandatory=$true)]
[string]$DataType,

[Parameter(Mandatory=$true)]
[string]$CrwProp,

[Parameter(Mandatory=$true)]
[string]$MgdProp
)

$SSAName = "Search Service Application"
$ManagedMetadataCategory = "SharePoint"

Function MapManagedProperty ($CrwProp, $MgdProp, $DataType)
{
$ssa = Get-SPEnterpriseSearchServiceApplication -Identity $SSAName
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity $ManagedMetadataCategory
$cct = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name $CrwProp -Category $cat

If ((Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity $MgdProp -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Managed Property" + $MgdProp + "does not exist. The script will attempt to create it."
$mct = New-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Name $MgdProp -Type $DataType -Queryable $true
}

New-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -CrawledProperty $cct -ManagedProperty $MgdProp
}

#Ensure SharePoint PowerShell snapin is loaded
if((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null){
Add-PSSnapin Microsoft.SharePoint.PowerShell
}

MapManagedProperty $CrwProp $MgdProp $DataType

Write-Host "Property mapping is completed" -ForegroundColor Green

Wednesday, March 19, 2014

Integrating Yammer with SharePoint Online


There is no question about the importance of social media in our daily lives. What were we doing 8 or 10 years ago without all these Facebook, Twitter, LinkedIn…. The big buzz of these days is the "Enterprise Social" for sure. Every conference I attend, everybody I talked to there is always "Enterprise Social" in the menu. In some organizations these public social networks are restricted to end-users however they still talk about the social in the enterprise. So what is this? How does is work?

If you haven't heard about Yammer, Chatter or Jive then it will be soon that you'll get introduced to either one of these network through your organization. These are the special Enterprise level social networks that brings Facebook, Twitter, LinkedIn type of functionality to your company. The major difference in between these social tools vs. the public ones is the security and control. Your IT department will have more control over how you social and what you share in the organization by utilizing these networks.

Well, to keep it short I would like to jump to Yammer directly. Yammer is acquired by Microsoft in 2012 for about $1B. It was a big news and very important acquisition for Microsoft. The goal is to integrate it with the SharePoint however it was too late in the development/release cycle of the SharePoint 2013 therefore it wasn't truly baked in.

However Yammer is very easy to integrate with SharePoint 2010 and 2013, especially with SharePoint Online which is one of the productivity tools comes under the Office 365 service offerings from Microsoft. In this blog post I would like to walk you through step-by-step instructions on how to integrate your existing Yammer ESN (Enterprise Social Network) with SharePoint Online. At this point I am assuming that you already have a Yammer network as well as already setup a SharePoint Online environment.

First you need to make sure that the account you are using for this task is the Office 365 Global Admin account. Then you need to go to your "SharePoint Admin Center" in your Office 365 administration site. And click "settings" on the left hand side quick links menu to get to a screen which you will be able to enable your Yammer service.

In this screen on the Enterprise Social Collaboration section please select "Use Yammer Service" and click "Ok"






















Next you will have to get the Yammer SharePoint App from the Microsoft Office Store. In order to do this you need to go to your Office 365 SharePoint Admin page which is located at https://XXXXX-admin.sharepoint.com. Then select "Apps" from the left menu and then select "Purchase Apps". You will then land into the SharePoint App Store.

Once you are in the App Store you can locate the "Yammer App for SharePoint" either by browsing or searching. After you locate the app you will then "Add it" to your site.



























After some confirmations the "Yammer App for SharePoint" will get installed in your site collection and now you can add this app to the site collection but before doing that we need to make the app available for use. Please go to the site collection which you want to add the Yammer App for SharePoint. Then click "Settings" and select "add an app" from the pull down menu. From the "Add you can add" section select "Yammer App for SharePoint". Then you will get the screen that SharePoint is asking you to trust the app for that particular site collection.
  
As soon as you hit "Trust It", SharePoint will add the app to the site collection.
No you are going to add "Yammer App for SharePoint" to the page where would you like to see the Yammer feed. Navigate to the page and then select "Page" -> "Edit". Then select "Insert" from the ribbon and click "Add an app"
 
 
 Select the "Yammer Feed" from the Parts section and then select Yammer feed app before clicking "Add". Now you've added the Yammer App for SharePoint to your page. Just click Save and exit from the editing mode. Yammer app will ask you to login to your Yammer feed by using your email and password. Just go ahead and enter your credentials. Here is how it should look like at this point.


 
Yammer app will ask you to chose the type of feed you'd like to see. Lets select the "Home" feed. And here we go. We just easily integrated Yammer App for SharePoint with Office 365 - SharePoint Online.
 
 
 
I hope you enjoyed it. Please let me know what you think.

Tuesday, January 28, 2014

SharePoint Online 2013 Site Assets - Lists, Libraries and Apps - 3 of 3

In these blog posts I wanted to explain and talk about OOTB (Out Of The Box) SharePoint Site Assets as Site Collection Features, Site Features, default Lists, Libraries and Apps. This is the third and last blog post of series of three. In the first blog post I have explained the default Site Collection Features come as activated in SharePoint 2013 Online. In the second blog post I went over default Site Features activated per each site template. These features represents a modular customization files either located at the server-side or at the file system. These features can be activated or deactivated by a site collection administrator or a person who has elevated permissions such as full control or design.

In this particular blog post I will give you a list of the default Lists, Libraries, Installed Apps and available Apps for each Site Template. When I was preparing this list I used three terms to describe the status for a specific App. these are:
  1. Ready: This denotes that the particular App is installed and ready to use when a new site created using the specified Site Template.
  2. Available: This denotes that the particular App is ready to be added/ or created in this particular Site Template however it is not installed and not ready to use. All you have to do is to add a new App to use this particular App.
  3. N/A: This denotes that the particular App is not available in this Site Template. If you need to use this particular App in the selected Site Template you need to create it from scratch or you need to chose a different Site Template.
The following image is the list of default Lists, Libraries activated and available for each Site Template. Please click the following image for larger size.



























If you would like to obtain the excel file used to create this list and the lists mentioned in my other posts, please feel free to send me a note so I'll be happy to share it with you.

I hope this helps.
.

Sunday, January 26, 2014

SharePoint Online 2013 Site Assets - Site Features - 2 of 3

In these blog posts I wanted to explain and talk about OOTB (Out Of The Box) SharePoint Site Assets as Site Collection Features, Site Features, default Lists, Libraries and Apps. This is the second blog post of series of three. In the first blog post I have explained the default Site Collection Features come as activated in SharePoint 2013 Online.

In my next blog post I will give you a list of the default Lists, Libraries, Installed Apps and available Apps per each site template.

In this particular post I would like to go over default Site Features activated per each site template. These features represents a modular customization files either located at the server-side or at the file system. These features can be activated or deactivated by a site collection administrator or a person who has elevated permissions such as full control or design.

The following image is the list of default Site Features activated and available for each Site Template. Please click the following image for larger size.



At this point I also would like to give you a list of all Site Collection Features, their description and their related features or services. You can also find this table at Microsoft's web site: http://office.microsoft.com/en-ca/sharepoint-server-help/activate-features-for-sites-HA102772224.aspx?CTT=1


Site Feature
Description
Access app Adds the Access web application
Automatic Mobile Browser Redirection Automatically redirects the requests from supported mobile browsers to default mobile pages. Refer to configuration files for supported mobile browsers. Non-collaborative sites relying on branded Publishing pages typically do not make use of this feature.
BICenter Data Connections Feature  
Class My Site Host Content Adds class and group content to the My Site Host site collection
Class Web Types Adds required content types to the SharePoint class web.
Community Site Feature Adds community functionality such as discussion categories, content and people reputation, and the members list. It also provisions community site pages which contain these lists and features.
Content Management Interoperability Services (CMIS) Producer Make the data stored in this SharePoint site collection available to application via the Content Management Interoperability Services (CMIS) interfaces using SOAP and AtomPub.
Content Organizer Create metadata based rules that move content submitted to this site to the correct library or folder.
Discover Project Sites  
Duet Enterprise - SAP Workflow Enables the site to host SAP workflow task types
Duet Enterprise Reporting Retrieves data from the SAP System and generates reports. You can also create and save report settings to generate reports according to your personal preferences.
Duet Enterprise Site Branding Enables the Duet Enterprise logo appear as the site logo
External System Events Enables Alerts and Event Receivers on the External List and External Content Types.
Following Content Enables users to follow documents or sites.
Getting Started Creates an instance of the Promoted Links list with items about how to get started with your SharePoint site.
Getting Started with Project Web App Creates an instance of the Promoted Links list with items about how to get started with your Project Web App site.
Group Work Lists Provides Calendars with added functionality for team and resource scheduling.
Hold Used to track external actions like litigations, investigations, or audits that require you to suspend the disposition of documents.
Metadata Navigation and Filtering Provides each list in the site with a settings page for configuring that list to use metadata tree view hierarchies and filter controls to improve navigation and filtering of the contained items.
Minimal Download Strategy A technique that enables faster and more fluid web navigation experience, in pages and site templates that support it, by downloading and rendering only those portions of a page that are changing.
Mobile Browser View Enables a mobile view for document libraries and other lists in a Team site, for smartphone browsers.
Offline Synchronization for External Lists Enables offline synchronization for external lists with Outlook and SharePoint Workspace.
PerformancePoint Services Site Features Features enabling the PerformancePoint Services list and document library templates.
Project Functionality This feature adds project management functionality to a site. It includes tasks, a calendar, and web parts on the home page of the site.
Project Proposal Workflow Provides a review workflow for managing project proposals.
Project Web App Connectivity Provides the lists required within a Project Site for integration with Project Web App including issues, risks, and deliverables.
Project Sites Collaboration Lists Provides the lists required within a Project Site for integration with Microsoft Project Server including Project Documents, Project Issues, Project Risks, and Project Deliverables.
Push Notifications Enables platform functionality that will allow mobile devices to subscribe to notifications for events that happen on this SharePoint site.
SAP Workflow Web Parts Enables the usage of SAP Workflow Web Parts.
SharePoint Server Enterprise Site features Features such as Visio Services, Access Services, and Excel Services Application, included in the SharePoint Server Enterprise License.
SharePoint Server Publishing Create a Web page library as well as supporting libraries to create and publish pages based on page layouts.
SharePoint Server Standard Site Features Features such as user profiles and search, included in the SharePoint Server Standard License.
Search Config Data Content Types Install content types designed to manage search configuration.
Search Config Data Site Columns Install columns designed to manage information about search configurations.
Search Config List Instance Features Provisions a list to enable the import and export of Search Configurations.
Search Config Template Feature  
Site Feed Enables the use of site feeds.
Site Mailbox The Site Mailbox app helps you keep email and documents close together by connecting to your site to an Exchange mailbox. You can then view your email on SharePoint, and view site documents in Outlook.
Site Notebook Creates a Microsoft OneNote notebook in the Shared Documents library and places a link to it on the Quick Launch.
Team Collaboration Lists Provides team collaboration capabilities for a site by making standard lists, such as document libraries and issues, available.
Team Mailbox Set up a shared mailbox for your team and access it from this site as well as from Outlook.
Wiki Page Home Page This site feature will create a wiki page and set it as your site home page.
Workflow Task Content Type Adds the SharePoint 2013 Task content type to the site
Workflows can use app permissions Enables workflows to read from and to write to all items from the site.    

If you would like to obtain the excel file used to create this list and the lists mentioned in my other posts, please feel free to send me a note so I'll be happy to share it with you.

Wednesday, January 22, 2014

SharePoint Online 2013 Site Assets - Site Collection Features - 1 of 3

Once you start working with SharePoint, you start creating sites, enabling features and adding some site contents based on the templates. By default each site template comes with a pre-defined set of site features as well as site contents as lists and libraries.

If you don't want what is in the default Site Template, you probably are going to try a few different Site Template based on the description provided by Microsoft SharePoint team. After giving a try to couple of them then you'll probably give up and create either a "Team Site" to customize or start with a "Blank Site" and add whichever content you'd like.

However knowing which site templates comes with what components, I believe will make your lives easier because even "Blank Site" template has some limitations and for most of the cases a "Team Site" template is not a preferred way to start.

I took the liberty and created an inventory, as you will find for the all default OOTB (Out Of The Box) site templates and their associated "Site Collection Features", "Site Features" and default Lists and Libraries along with available "Apps" to each one of them.

I have compiled them in three blog posts. These are:
  1. Site Collection Features
  2. Site Features
  3. Lists, Libraries and Apps
In this blog post - first one of the series of three, I would like to show you the Site Collection Features come activated for each  Site Template. Please click the following image for larger size.























At this point I also would like to give you a list of all Site Collection Features, their description and their related features or services. You can also find this table at Microsoft's web site: http://office.microsoft.com/en-ca/office365-sharepoint-online-enterprise-help/enable-or-disable-site-collection-features-HA102772720.aspx


Feature Name
Description Related feature or service
Aggregated Business Calendar Displays multiple business calendars in an overlay alongside Exchange and SharePoint calendars. None
Content Type Syndication Hub Specifies an existing site as the Enterprise Metadata Hub and adds functionality to the site that is implemented through the Enterprise Metadata Shared Services Application. None
Cross-Farm Site Permissions Allows internal SharePoint applications to access websites across farms. None
Custom Site Collection Help Creates a Help library that can be used to store custom help for a site collection. None
Disposition Approval Workflow Manages document expiration and retention by allowing users to decide whether to retain or delete expired documents. Workflow feature
Document ID Service Assigns unique, readable document IDs to documents in the site collection which can be used to retrieve items independent of their current location and helps manage and track information. Enables the Document ID Web Part
Document Sets Provides the content types required for creating and using Document Sets which can be used to manage multiple documents as a single entity. Each Document Set has its own version history, workflow, and shared metadata while each content item retains its own specific version history, workflow, and metadata. None
Duet End User Help Collection Enables the Duet End User Help Collection. None
Duet Enterprise Reports Content Types Defines the fields and content types that will be used by Duet Enterprise Reports. None
In Place Records Management Enables the definition and declaration of records in-place. Instead of managing records in an archive, you can use in-place records management to manage records in the same document repository as active documents. When you declare that a document is a record, it remains in the same location, but it is managed as a record. You can decide what actions cause an active document to become a record, restrict who can perform records-related operations, restrict what actions users can perform on records, and specify a retention policy for active documents. None
Library and Folder Based Retention Allows list administrators to override content type retention schedules and set schedules on lists, libraries, and folders None
Limited-access user permission lockdown mode When enabled, permissions for users with “limited access” permissions, such as Anonymous Users, are reduced, preventing access to Application pages including item properties or list views. Additionally, if a document, folder, or library has unique permissions, those users will not be able to:
Use the drag and drop feature to upload documents
Browse to the affected folder
Use the Shared with feature
Open documents in the Office client
Some callout features on documents and folders will not render as expected.
Open Documents in Client Applications by Default Configures links to documents so they open in client applications instead of in the browser by default. None
Project Server Approval Content Type Used by the Project Server Approval workflow. Microsoft Project Server 2013
Project Web App Ribbon Enables the ribbon controls for Project Web App pages. Microsoft Project Server 2013
Project Application Service
Project Web App Settings Project Web App Project Management (PMO) settings. Microsoft Project Server 2013
Project Application Service
Publishing Approval Workflow Routes a page for approval. Approvers can approve or reject the page, reassign the approval task, or request changes to the page. This workflow can be edited in SharePoint Designer. None
Reporting Creates reports about information collected in SharePoint Online. None
Reports and Data Search Support Provides content types, site columns, and library templates required to support Reports and Data Search in the Enterprise Search Center. None
Sample Proposal Adds the sample workflow for Project Server. Microsoft Project Server 2013
Project Application Service
Search Engine Sitemap Automatically generating a search engine sitemap containing all valid URLs in a SharePoint website on a recurring basis which can be used to improve search engine optimization. Anonymous access must be enabled
Search Server Web Parts and Templates Enables the following Search Server Web Parts: See Web Part List
Advanced Search Box
Dual Chinese Search
People Refinement Panel
People Search Box
People Search Core Results
Related Queries
Refinement Panel
Search Action Links
Search Best Bets
Search Statistics
Federated Results
Top Federated Results
SharePoint 2007 Workflows Enables an aggregated set of out-of-box workflow features provide by SharePoint 2007. None
SharePoint Server Enterprise Site Collection features Enables the following services: Applies only to the SharePoint Server Enterprise License
InfoPath Forms Services
Visio Services
Access Services
Excel Services
SharePoint Server Publishing Infrastructure Enables a set of Web Content Management functionality such as Team Sites and Public-facing websites. This includes centralized libraries, content types, master pages, and page layouts. Enables page scheduling and other publishing functionality for a site collection. None
SharePoint Server Standard Site Collection features Enables the following services: Applies only to the SharePoint Server Standard License
User Profile Service
Search Service
Site Policy Allows site collection administrators to define retention schedules that apply to a site and all of its content. None
Three-state workflow Enables the workflow that is used to track items in a list. None
Video and Rich Media Provides libraries, content types, and Web Parts for storing, managing, and viewing rich media assets like images, sound clips, and videos. None
Workflows Enables an aggregated set of out-of-box workflow features. None
    In the second blog post of the series of three you will find the default Site Features activated by each Site Template.