Tag: User Profiles

User Profiles – Driving Business Process

The workflow features first introduced in WSS 3.0/MOSS in 2007 and enhanced in the 2010 offerings present an opportunity for organizations with SharePoint to start to automate the coordination of their business processes.  While many have been working with it, one of the limitations I have seen is that everything is localized to a particular site or process.  In many cases there are configuration or user attributes managed in a local list that can be used as a data source. 

Manage the Data Centrally

One technique that is not widely used, but could greatly enhance the capabilities and manageability of the workflows as a whole would be to utilize the User Profiles more to house and maintain information relating to the users.  By managing it centrally it can be used by all processes throughout the organization.  For user maintained properties, it provides a central and secure mechanism for them to maintain it.  For system maintained properties, synchronized from an external system through AD or the BCS (HRIS, CRM, etc) there are already mechanisms in place to manage this.

In SharePoint Designer 2010 there is a new action that supports a lookup for a user’s manager.  This would be a critical component to support approval workflows obviously, but for most business processes there are other attributes that are also needed.  Some could be based on default user profile fields like Location or Hire Date, but others are likely to be custom to the organization.  Custom properties could include employee IDs, department charge codes, division identification, etc.  [Note: See User Profiles – Creating Custom Properties for a walk through] 

How to Access the Data

Typically the information is accessed via the API with UserProfileManager or the UserProfileService web service (/_vti_bin/userprofileservice.asmx).

InfoPath – From InfoPath you can identify a DataSource through a Web Service call pointing to the UserProfileService.  [Note: See Itay Shakury’s blog for full walk through]

Visual Studio Workflows – In visual studio with the full ASP.NET capabilities it is easiest and most effective to use the UserProfileManager to access the profile and all properties.

SharePoint Designer Workflows – With the exception of the manager lookup action that was added, SharePoint Designer workflows will need either a custom or third party action that can interact with the User Profiles. 

I am currently working on a simple action that I will blog about and post to CodePlex.

Other Uses – Delegation of Authority

This process could also be used to provide a mechanism for maintaining additional, more complex properties.  An example would be something like Delegation of Authority which allows a person of authority to be able to delegate (or pass) that responsibility to another person.  SharePoint does not handle this at all out of the box.  A series of fields could be defined to support this; Start Date, End Date, Delegate.  This information could be read into the discrete processes with management being centralized in the User Profiles.

The limitation with this model is that the User Profiles are not like a list and do not support advanced business rules.  If that is required a separate system would need to be build, but I would recommend you try and keep it centralized and not built into the specific process.

Summary

By leveraging the User Profiles as a central repository that can support your organization’s processes you will simplify the management of the information and make it much easier to reuse in a consistent manner across the many processes. 

User Profiles – Creating Custom Properties

The User Profiles in SharePoint Server represent a very robust and flexible way to manage information about the members of your organization.  It can be used to fill the roll of a searchable Employee Directory, used to drive business processes and workflows, and also makes it easier to find people in the organization based on their expertise and user property attributes providing social networking functionality. 

The default properties that are created at the time of installation are just a starting point.  In this article I will show you just how easy it is to create new properties that help support your organization and business processes. 

Planning The New Property

When defining new fields here is a selection of things to consider:

  • Name / Display Name
  • Type – Wide range of field types
  • Length – Cannot be modified in some situations
  • Configure a Term Store Set – Managed Meta Data
  • Policy Setting – Required, Optional, or Disabled
  • Privacy Settings – Field level privacy
  • Edit Settings – User maintained or administrator/system maintained
  • Display Settings – Show on View/Edit/Newsfeed
  • Search Settings – Support for a user Alias (i.e. Employee ID) and if it is Indexed
  • Profile Synchronization – You also have the ability to configure a synchronization with an external system (i.e. CRM, HRIS)

In many cases the options change based on the value of previous options.  A good example is based on the settings with the Type of string (Multi Value) or the Policy Setting.

Create Custom Property Walkthrough

Since I work in consulting, much of our content is very much client focused.  This is a great example of a property that would be very important to us, but not so important for the average company.  In my case, I want to allow consultants to add one or more customer names that they have worked with.  Since this valuable information could potentially be used for a number of purposes, (like tagging) throughout the entire SharePoint environment, I have decided to create a Managed Meta Data Term Set for this property so that we can reuse the content. 

Here is a quick shot of the Client List I created in the Term Store.

Define A Term Set

To create a new property, browse out to the User Profiles Service Application (or whatever your Profile Service App is named) and select the Manage User Properties link.

Manage User Properties

A full listing of the User Properties is displayed with properties organized into sections.  They can be ordered and placed into sections as needed.  To create a new property, simply click the New Property menu item.

New Property

Complete the main Property Settings.  In many cases changes to these settings cannot be made which means the previous property would have to be deleted and recreated.  In this case I created my Clients property and set it to a multi-value string separated by semicolons.  I then pointed it to the Client List Term Set previously configured.

Property Definition

The next set of fields control how the list is displayed and if it can be edited.  In this case, I want to make it an optional property and encourage consultants to maintain the value so I will enable it in each of the Display Settings.  It is not confidential information, so I will be sure to set the Privacy level to Everyone. 

Display and Policy Settings

Here is what the current profile looks like when rendered.  You can see that the Clients field is displayed and each value a link that feeds into the People Search.

Profile View

Once the values have been crawled and are available in the search index, you will start to see results in the people search process. 

People Search

Summary

By extending the User Profiles with custom properties you can leverage the robust platform to support an organization and its unique processes and content.

UserProfileServices Web Service and Adding Links to SharePoint Profile

I really like the MyLinks feature in MOSS. Its one of the Personalization features that really comes in handy for me as I sign into different computers around campus giving demos or presentations. A few weeks ago I posted an article about a t-sql query I have for listing out all of the MyLinks stored in the Shared Service Provider’s database. [Blog Post – Sharepoint MyLinks Listing.html] Up until very recently I hadn’t found a way to programatically add links, but that changed while I was doing some work developing a custom web part that interacts with the User Profiles. One little web service call opened up a whole new group of possabilities.

Userprofileservice – http:///_vti_bin/userprofileservice.asmx

On top of all of the regular methods available for interacting with the user’s profile, it also includes a simple method for adding a link.

UserProfiles.AddLink(AccountName, Title, URL, Group, Privacy Level)

This would make it possible to move links from one SSP to another in the case where you need to rebuild it, or in large deployments with multiple SSPs this can be used for synchronizing links between SSPs.

Another interesting use would be to develop a web part or user control that would let users add links from within a page. Many don’t think about the feature since the MyLinks menu is in the upper right corner of the screen. The user control would let users also link to items from other applications outside of the SharePoint farm. While this isn’t as feature rich as a tool like Delicious, it is useful and secure for internal data.

SharePoint MyLinks Listing

MyLinks is an important MOSS feature that is well used in many organizations. Unfortuantely many administrators incorrectly believe that the data is stored in the MySite collections when its actually stored in the Shared Service Provider as part of the user’s shared profile. That is what allows the data to be shared between the different site collections and web apps.

I have on occassion, more than I would care to admit, had to recreate the Shared Service Provider to repair search related issues. Creating a new SSP means that this profile data will be wiped out. In this case I think its a good proactive step to pull a list of the links that are being used. Reviewing the list not only gives the administrator a good idea of how the feature is being used, but it would then be possible to supply the users with a list of the links that need to be setup when the maintenance is complete.

The following script can be used to gather the data. The UserLinks and UserProfile_Full tables are in the Shared Service Provider database.

Select Prof.NTName, Prof.PreferredName, Prof.Email, Link.GroupTitle, Link.Title, Link.URL
From UserLinks Link inner join UserProfile_Full Prof on UL.recordId = Prof.recordID
order by Prof.ntname

Generally speaking it is a bad idea to accomplish something by directly accessing the database. Any changes should definitely be made by the API or through the Web Services supplied. There are a few special cases though where the API doesn’t really help you. One such exception is reviewing this MyLinks data.

%d bloggers like this: