Tag Archives: Microsoft SharePoint

Tweaking The Blank Web Part Page Template In SharePoint 2013

The Blank Web Part Page template in SharePoint 2013 has a large Page Content section.  I find this irritating as you have to scroll down to get to the web part section.  In this post I’ll show how you can reduce the size of this section to make editing pages easier.

Blank Web Part Page Layout1

Open SharePoint Designer and navigate to the Page Layouts section.  Check Out the BlankWebPartPage.aspx file.

BlankWebPartPageLayout2

Open the file and Advanced Mode.  Scroll down to the line starting <PublishingWebControls:RichHtmlField FieldName=”PublishingPageContent”.  Find the property MinimumEditHeight and change the value to something like 50px.

BlankWebPartPageLayout3

Check In BlankWebPartPage.aspx and Publish a major version.

BlankWebPartPageLayout4

When you create a page using this template you’ll see the Page Content section is smaller.

BlankWebPartPageLayout5

6

 

User License Enforcement In SharePoint 2013

One of the great features of SharePoint 2013 is User License Enforcement.  This enables you to map users, or Active Directory security groups to a SharePoint license level.

User License Enforcement is disabled by default and is dependent on Claims authentication.  However, Claims authentication is the default in SharePoint 2013 http://technet.microsoft.com/en-us/library/cc262350.aspx.

To enable User License Enforcement, open the SharePoint 2013 Management Shell and type Enable-SPUserLicensing.  To confirm User Licensing is enabled type Get-SPUserLicensing.  Enabled, True should be the output if it’s enabled.

To map an Active Directory security group to a SharePoint Enterprise license enter

$a = New-SPUserLicenseMapping -SecurityGroup “yoursecuritygroup” -License Enterprise

Add-SPUserLicenseMapping $a

Replace Enterprise with either “Standard”, “Project”, “DUET”, or “WAC” depending on the license level you wish to enable.  Project is for Office Project Server, DUET is for SAP and WAC is for edit rights in Office Web Apps.

In the screenshot below I’ve mapped two Active Directory security groups to different license levels, one to an Enterprise license and one to a Standard license.

UserLicensing1

Once you have configured the license mapping, enter Get-SPUserLicenseMapping to view the mappings.

UserLicensing2

Once the User License Enforcement has been configured users will see a different view dependent on their license level.  Below you can see a user mapped to an Enterprise license can create sites, such as Business Intelligence Center.

UserLicensing3

The user in the screenshot below is mapped to a Standard license and has a different set of site creation options.

UserLicensing4

If a user with a Standard license accesses a page containing an Enterprise level web part they may see an error relating to a lack of license.

UserLicensing5

For a full list of licensing PowerShell cmdlets visit the TechNet site http://technet.microsoft.com/en-us/library/jj219609.aspx

An Unhandled Exception Has Occurred When Creating A Business Intelligence Center

You attempt to create a Business Intelligence Center site and receive and error like the one below.

BIError1

 

You may also see an error in the application event log for ASP.NET 4.0, event id 1309.

Exception information:
Exception type: SPException
Exception message: Dependency feature ‘PPSSiteCollectionMaster’ (id: a1cb5b7f-e5e9-421b-915f-bf519b0760ef) for feature ‘PPSSiteMaster’ (id: 0b07a7f4-8bb8-4ec0-a31b-115732b9584d) is not activated at this scope.
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate)
at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate)
at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Nullable`1 bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page, Boolean bDeleteOnError)
at Microsoft.SharePoint.ApplicationPages.NewSubwebPage.BtnCreateSubweb_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

These errors are caused because the PerformancePoint Services Site Collection feature hasn’t been enabled at the Site Collection level.  Open Site Settings, then click on Site collection features under Site Collection Administration.

BIError2

 

Activate the PerformancePoint Services Site Collection Feature.

BIError3

 

Incorrect Permissions For Central Administration Following Initial SharePoint 2013 Installation

Following the installation of a SharePoint 2013 environment I had an issue where Farm Administration security settings hadn’t been correctly applied.  Even though my SharePoint setup user account was listed in the Farm Administrators group and was a local administrator, many options were missing from the Central Administration site.  Some of the missing options included manage services on server and I was unable to create new service applications.

In order to correct the permissions, I re-ran the SharePoint 2013 Products Configuration Wizard.  When running the wizard I left all the options as they were.  Once the wizard had completed the permissions had been set correctly and Central Administration displayed all the options correctly.

Create A Search Tab In SharePoint 2013

In this post I’m going to describe the process of creating a search tab in SharePoint 2013. I’m going to create a tab called SP2010 which returns results from a specific result source called SP2010.

Search Tab 1

Search Tab 2

Start by creating a result source for the specific content source.  From the Search Service Application click on Result Sources under Queries and Results.

Search Tab 3

Click on New Result Source.  On the following screen enter a name, I’ll user SP2010 here and in the Query Transform box add ContentSource= followed by the name of your content source.  In the screenshot below I’ve entered ContentSource=sp2010 as that’s the name of my content source.  Click save to close.

Search Tab 4

Now create a page to display the search results for this result source.  Open your search site and from the options menu choose to Add a page.  Enter a name for the page.  I’ve chosen sp2010 as this is the name of my result source.  Click Create to create the page.  When the page is displayed, edit the search results web part.

Search Tab 6

In the web part properties click on Change Query.

Search Tab 7

From the Build Your Query page select your result source and click OK.

Search Tab 8

Check in and publish the new search page.  Next, open Site Settings for your search site and select Search Settings from the Search section.

Search Tab 9

In the Configure Search Navigation section click on Add Link..  Enter a title and in the URL box enter the path to your new search page, e.g. /Search/Pages/sp2010.aspx.  Click OK to save the link.

Search Tab 10

If you navigate to your search site you should see the new tab.

Search Tab 11

The tab will only display results from the result source you selected when editing the search page.

Extend SharePoint 2013 People Search Using Business Connectivity Services – Multi-Value User Properties

Following on from the four part series Extend SharePoint 2013 People Search Using Business Connectivity Services I had a requirement to update multi-value user properties using BCS.  If you haven’t read the posts in the series I highly recommend that you do as I’m only going to cover the changes I had to make in order to import multi-value properties.

For this example I’ve added a column to my SQL Server table called Speciality and updated the stored procedure to return the values in this column.

BCS-Multi1

In the screen shot above I’ve added three specialties for myself, SharePoint, Hyper-V and SQL Server.  This has created multiple rows, an additional row for each specialty  each with the same email address.  The email address is important as this will be used by a filter within the external content type to return multiple values for each user.

Next, in SharePoint Designer open the external content type that references the stored procedure and click on Operations Design View in the ribbon.

BCS-Multi2

In Data Source Explorer find the stored procedure under Routines, right click on it and choose New Read List Operation.

BCS-Multi3

Click Next and on the Input Parameters screen click to add a Filter.  Create the filter, in my case on the email field and click Ok.  

BCS-Multi4

On the Return Parameter screen click on Email, then tick Map to Identifier.  Finish the wizard and save changes to your external content type.

BCS-Multi5

From Central Administration open your User Profile Synchronization Service and click on Configure Synchronization Connections.

BCS-Multi6

Use the drop down to edit your external content type connection.  You can now choose a 1:many mapping, filter using the email filter against the WorkEmail user profile property.

BCS-Multi7

To create a multi-value user open the User Profile Synchronization Service and click on Mange User Properties.

BCS-Multi8

Click on New Property, select the property type as string (Multi Value) and choose the multi value separator you’d like to use.

BCS-Multi9

Map the new property to the correct attribute from your BCS data connection and click Ok.

BCS-Multi10

Run a full profile synchronization, then click on Manage User Profiles to search for a user and check the properties have been populated.

BCS-Multi11

BCS-Multi12

Extend SharePoint 2013 People Search Using Business Connectivity Services Part 4

In this four part series I will describe the process of extending the SharePoint 2013 user profile from Active Directory with additional data from a SQL Server table.  The additional data will then be displayed in users’ My Sites and SharePoint people search.

Part 1 will show the process to create the SQL Server table.  Part 2 will show the process to make the data in the SQL Server table accessible to SharePoint.  Part 3 will show the process to extend user profiles and My Sites to include the additional user data.  Part 4 will show the process to make the new user profile properties accessible in SharePoint Search.

The SharePoint environment is SharePoint 2013 Standard, with SQL Server 2008 R2 and SharePoint Designer 2013.  The steps are based on an environment where the User Profile Service has already been setup, users have been imported from Active Directory and My Sites have been configured.  It is assumed that SharePoint Search has been configured and a search site using the Enterprise Search Center template has been created.

In this post I’ll describe the process of making the custom user profile properties you populated in the last post visible within SharePoint Search.

Open Central Administration -> Application Management -> Manage service applications and open your Search Service Application.  Click on Content Sources, then click on the drop down for your user profile content source and run start an incremental crawl.

BCS - Search1

Once the crawl has completed click on Search Schema under Queries and Results.

BCS - Search2

Click on Crawled Properties, then in the managed property box search for one of your custom user profile properties.

BCS - Search3

Your custom property should be listed as People:XXXX as the property was added as a user property.  Click on the custom property and check the Include in full-text index box is ticked.

BCS - Search4

Return to the Managed Properties screen and click on New Managed Property.

BCS - Search7

Enter a property name, e.g. Jurisdiction and select the correct data type.

BCS - Search8

There are many options to experiment in this screen, but as a minimum for this example tick Queryable (this appears to be a requirement for the refiner option), Retrievable, which allows us to display the property in search results and set Refinable to Yes – active as I want to be able to refine search results using this custom property.  Finally, map this new managed property to the custom user profile property and click Ok.

BCS - Search9 BCS - Search10

Repeat these steps for all the other custom properties you wish to use in search.  Once you’ve created all your managed properties run a full crawl of your content source.

BCS - Search12

Once the full crawl has completed we need to add the custom properties to the list of refiners and search result.  Navigate to your search site and search for a user that will have the custom properties populated.

BCS - Search5

Edit the search results page, and click on Edit Web Part for the Refinement web part.

BCS - Search6

In the Properties for Search Refinement screen click on Choose Refiners.

BCS - Search11

From the screen that loads, select the custom property you wish to add as a refiner and click Add, then click Ok.

BCS - Search13

Click OK on the Properties for Search Refinement web part.  You should now see your new refiner.

BCS - Search14

If you’re happy check in and publish the page.

BCS - Search15

Now we I’m going to show you the process to display a custom property under the user’s details.  Edit the Search page and click on the display template link.

BCS-SDT1

On the display template page choose to download a copy of the existing People Item template.

BCS-SDT2

Create a copy of the downloaded template and open it in a text editor like Notepad++.  Update the title field to indicate this is your custom display template.

BCS-SDT2.5

Add your custom user property name to the ManagedPropertyMapping section.

BCS-SDT3

Create a variable for your custom property.

BCS-SDT4

I’ve copied the department section and replaced the variable etc. with jurisdiction.  I’ve also added Jurisdiction:  in the value DIV as this will add a prefix to the value on the search result screen.

BCS-SDT5

Open SharePoint Designer, connect to your SharePoint site and navigate to Page Layouts -> Display Templates -> Search.  Click on Import Files in the ribbon and upload your custom display template.

BCS-SDT6

Navigate to the display template gallery and publish a major version of your template.

BCS-SDT7

Using the link on the search results page, open the Manage Result Types page.  Use the drop down for the Person result type to create a copy.

BCS-SDT8

Enter a name for the new result type and select your custom display template.

BCS-SDT9

In my environment the updated display template worked straight way.  However, if you need to change the display template, on the people search results page edit the web part properties on the People Search Core Results.

BCS-SDT10

Select your custom display template and save changes.

BCS-SDT11

You should now see the custom property in the search results.

BCS-SDT12

Troubleshooting

If you have problems getting this to work the following tools may help:

Monitor connections to the SQL Server during the user import task using SQL Server Profiler.  This will enable you to see if SharePoint is connecting to the SQL Server and the commands that are being run.

Monitor the user import process using Synchronization Manager Service, which can be found at “C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\UIShell\miisclient.exe”.

Monitor SharePoint logs using the ULSViewer.  You can create a filter to include results only from Business Data Connectivity Services. http://archive.msdn.microsoft.com/ULSViewer

Extend SharePoint 2013 People Search Using Business Connectivity Services Part 3

In this four part series I will describe the process of extending the SharePoint 2013 user profile from Active Directory with additional data from a SQL Server table.  The additional data will then be displayed in users’ My Sites and SharePoint people search.

Part 1 will show the process to create the SQL Server table.  Part 2 will show the process to make the data in the SQL Server table accessible to SharePoint.  Part 3 will show the process to extend user profiles and My Sites to include the additional user data.  Part 4 will show the process to make the new user profile properties accessible in SharePoint Search.

The SharePoint environment is SharePoint 2013 Standard, with SQL Server 2008 R2 and SharePoint Designer 2013.  The steps are based on an environment where the User Profile Service has already been setup, users have been imported from Active Directory and My Sites have been configured.  It is assumed that SharePoint Search has been configured and a search site using the Enterprise Search Center template has been created.

In this post I’ll describe the process of extending the Active Directory user profiles with information from SQL Server and how to display this data in SharePoint people search and My Sites.

Open Central Administration -> Application Management -> Manage service applications and open your User Profile Service application.  Click on Configure Synchronization Connections.

BCS - AD1

On the Synchronization Connections page click on Create New Connection.  Enter a name for the connection, change the connection type to Business Data Connectivity.  In the Business Data Connectivity Entity section, select your External Content Type.  Choose to connect using a 1:1 mapping and return items based on the WorkEmail property.  Click Ok.

BCS - AD2

We now need to map the fields returned by the connection to SQL Server to fields in user profiles.  Return to your User Profile Service application in Central Administration and click on Manage User Properties.

BCS - AD3

On the Manage User Properties screen click on New Property.  I’m going to show the process to create a property called jurisdiction, which will be mapped to the jurisdiction field in SQL Server.  The process needs to be repeated for all fields you wish to add to the user profile.

Enter a name, display name and change the data type and field length to match the field you’re mapping.

BCS - AD4

Change the Policy Setting to optional, and the Default Privacy Setting to Everyone.  This allows the field to be displayed in the profile properties section of the user’s profile.  I don’t want users to be able to change the jurisdiction value, so update the Edit Settings as appropriate.  In order to display the value on the user’s profile page tick the box under Display Settings.  Ensure the Indexed box is ticked to make the property searchable.

BCS - AD5

You now need to map the user profile property to the field in the External Content Type.  Choose the Employees data source and the appropriate field to map to the user property.  Leave the direction as import and click Add, followed by Ok to save the new property.

BCS - AD6

Repeat this process for any other properties you wish to map to user profile properties.  Once you’ve mapped all the user properties run a full user profile synchronization process from Start Profile Synchronization.

BCS - AD7

Once the profile synchronization has finished, click on Manage User Profiles, then search for a user that should have been populated with data.

BCS - AD8

If you scroll through the user profile you should see your custom user profile properties have been populated.

BCS - AD9

Visit a user’s My Site and click on SHOW MORE under the user’s details to see your custom user profile properties.

BCS - AD10

In the final part of this series I’ll show you how to make the custom properties visible within SharePoint Search.

Extend SharePoint 2013 People Search Using Business Connectivity Services Part 2

In this four part series I will describe the process of extending the SharePoint 2013 user profile from Active Directory with additional data from a SQL Server table.  The additional data will then be displayed in users’ My Sites and SharePoint people search.

Part 1 will show the process to create the SQL Server table.  Part 2 will show the process to make the data in the SQL Server table accessible to SharePoint.  Part 3 will show the process to extend user profiles and My Sites to include the additional user data.  Part 4 will show the process to make the new user profile properties accessible in SharePoint Search.

The SharePoint environment is SharePoint 2013 Standard, with SQL Server 2008 R2 and SharePoint Designer 2013.  The steps are based on an environment where the User Profile Service has already been setup, users have been imported from Active Directory and My Sites have been configured.  It is assumed that SharePoint Search has been configured and a search site using the Enterprise Search Center template has been created.

In this post I’ll describe the process of connecting SharePoint 2013 to the SQL Server table we created in part 1.

The first step is to create a Windows domain user account, which will be used to connect to SQL Server and execute the stored procedure we created to return the user data.  Once you’ve created the user account, grant it read permission to your test database and execute permission on the stored procedure.  You will also need to grant the same permissions to the user account you will use to create the External Content Type later.

Now we will use the Secure Store to configure the user credentials Business Connectivity Services (BCS) will use to connect to SQL Server.  Open Central Administration on your SharePoint server and navigate to Application Management -> Manage service applications -> Secure Store Service.  Click on New in Manage Target Applications.

BCS - SSS1

Enter a target application ID, display name and change the target application type to Group.

BCS - SSS2

Leave the fields in the next screen as they are and click next.

BCS - SSS3

Enter the administrators of this application into Target Application Administrators and in Members, enter the AD user group, or AD user that you want to be able to use the saved credentials to connect to SQL Server.

BCS - SSS4

You now need to configure the AD user account details for this application which BCS will use to connect to SQL Server.  From the Secure Store Service, click on the drop down arrow next to your application and click Set Credentials.  Enter the AD user account details you configured within SQL Server with permission to execute the stored procedure to return user data.

BCS - SSS5

You now need to open SharePoint Designer, connect to your SharePoint site and click on External Content Types and create a new External Content Type.

BCS - ECT1

Enter a Name for the External Content Type and click on “Click here to discover external data sources and define operations.

bcs-ect2

Click Add Connection and choose SQL Server as the data source type.

BCS - ECT3

Enter your SQL Server name, database name and choose “Connect with Impersonated Windows Identity”  Enter the name of the application you created in the Secure Store Service.

BCS - ECT4

Expand Routines under your datasource, right-click on the stored procedure you created to return user data and choose New Read Item Operation.

BCS - ECT5

Leave the first screen as it is and click Next.

BCS - ECT6

On the next screen ensure Map to Identifier is ticked and click Next.

BCS - ECT7

Ensure Email is mapped to Email and click Finish.

BCS - ECT8

Close and save the External Content Type.

Navigate to Central Administration, then Application Management -> Manage service applications -> Business Data Connectivity Service.  Click on the drop down next to your External Content Type.  Add the default content access account for your Search Service Application, set the permissions and click Ok.

BCS - ECT10

In part three of the series I’ll show you how to extend the Active Directory user profiles with information from SQL Server and how to display this data in SharePoint My Sites.