@_richardstk

Monthly Archives: April 2013

I was lucky enough to be asked to join the technical review panel for the Microsoft System Center Virtual Machine Manager 2012 Cookbook by Edvaldo Alessandro Cardoso and published by Packt.

This is a fantastic book if you’re already using SCVMM 2012, or thinking about doing so. It covers aspects of SCVMM 2012 from installation through to creating Hyper-V clusters and managing fabric updates with VMM. Be sure to give it a look http://link.packtpub.com/POCsIQ

I recently came across a problem with System Center Data Protection Manager 2012 (DPM) whereby backups were failing with the error “An unexpected error occurred while the job was running. (ID 104 Details: The device is not connected (0x8007048F))”

Unfortunately, I wasn’t able to resolve the problem without data loss, but these are the steps I followed to get DPM working again.

I saw a large number of RAW volumes with 100% free space. I had to delete each of these volumes, by right-clicking and choosing delete.

Once you’ve deleted all the RAW volumes, open the DPM Management Shell and run DPMSync – ReAllocateReplica. This recreates the volumes for each item that’s protected by DPM where the volume is missing.

Open the DPM Management Console and start an consistency check of all data sources. This ensures DPM has an up to date copy of all protected items and can resume backups.

In this post I’ll describe how you can import user photos from Active Directory (AD) into SharePoint 2013 and add them to SharePoint user profiles.

Firstly you’ll need to get your users’ photos into AD. I use AD Photo Edit from Cjwdev. The bulk edition is fantastic as it has command line support.

Once the user photos are in AD you need to update the SharePoint user picture property . Open Central Administration and navigate to your User Profile Synchronization Service Application. Click on Manage User Properties.

Scroll down to the Picture property and choose Edit from the drop down menu.

Scroll down to the Add New Mapping section. Choose your AD data connection, select the thumbnailPhoto attribute and click Add, followed by OK to save the change. This maps the SharePoint picture property to a user’s photo attribute in AD.

Run a full user profile synchronization.

Once the user synchronization has finished open the SharePoint 2013 Management Shell. Run Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation %MySiteURL%

The command could take a while to run. When it’s finished click on Manage User Profiles and search for a user and click on Edit My Profile.

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.

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.

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

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.

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

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

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.

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

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

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

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

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.

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

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

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.

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

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.

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.

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.

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

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

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

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

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

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.

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

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.

Add your custom user property name to the ManagedPropertyMapping section.

Create a variable for your custom property.

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.

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

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.

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

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.

Select your custom display template and save changes.

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

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”.

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.

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.

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.

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.

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.

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.

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.

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

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

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

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

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.

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

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

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.

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.

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.

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

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

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.

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

Leave the first screen as it is and click Next.

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

Ensure Email is mapped to Email and click Finish.

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.

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.