JavaScript client library and taxonomy fields

With the JavaScript API it’s possible to retrieve information about all the fields in a list. In most cases this will work without a hitch, but the problem is when you are using TaxonomyFields in your list.

Normally you will receive an array of objects containing methods such as get_internalName(), get_typeAsString() etc. If you have taxonomy fields in your list, the entry in the array doesn’t contain the expected object, but rather just the raw data.

After a lot of investigating and troubleshooting, I discovered that the TaxonomyField type isn’t defined together with all the other field types. It’s defined in SP.Taxonomy.js; this is part of SharePoint Server, not SharePoint Foundation.

If you include a reference to SP.Taxonomy.js and make sure it has been loaded, everything works as expected.


_api in SharePoint 2013 URLs

While browsing some of the MSDN samples on creating Apps for SharePoint, I noticed that they were using _api in some URLs.

Curious on what this was I checked if any new paths had been mapped in IIS Manager; nothing was listed to support his.
Doing some more digging in the SharePoint code, I discovered some special handling in the SPRequestModule.

_api is just a shorthand forĀ _vti_bin/client.svc

New security events in SharePoint 2013 Beta

SharePoint 2013 Beta introduces new events for security related activities. Using these we can achieve a whole set of new scenarios.

  • Perform additional checks on a user before being added to specific groups. i.e. verify that the user is a full time employee.
  • Prevent people from breaking security in certain areas of your system
  • When people are added to a group, perform additional tasks (i.e. fire off a web service call to update security in some external system)
  • Prevent people from deleting certain groups that may be expected by your code.

SharePoint 2013 developer dashboard receives a complete makeover

The developer dashboard has received a complete makeover in 2013. In 2010, this was something appended to the end of the page, in 2013 it gives you a wealth of new information.

The first thing you will notice is that it pops up in a new window rather than being added to the page output. A separate web service is responsible for feeding the page with information; as you make additional request to the server, they appear in the list of requests. For several types of information you can drill in further to reveal the stack trace and for SQL you can get the execution plan being used. This information can be incredibly valuable when analyzing performance and other issues in SharePoint.

Since it’s still Beta software, not everything is complete, but here are some screen shots indicating what type of information you can expect to find.

One personal site template no longer rules them all

In SharePoint 2007 and 2010 it was easy to staple a feature to the personal site; use SPSPERS#0

This has become a lot more tricker in SharePoint 2013. In this version, the template being used will depend on what permissions the user has at the time of personal site provisioning. Are they allowed to use social features? Are they allowed to use storage?

Digging into the SharePoint code, you can find the following function.

Assuming you are only interested in the SharePoint 2013 sites (no upgrading from 2010), there are now 3 different templates to consider.

One open question I haven’t found an answer to yet is what happens if people are given more permissions at a later date? A company starts off only with the social features and plans to introduce the storage capability later on. How do you upgrade the sites from one template to another without loosing existing data?

At the moment this seems like an odd design choice.

Activity feed architecture

The new activity feed in SharePoint 2013 is built using a couple of building blocks.

Data Storage

All data is stored in the Microfeed and Social lists; these are traditional SharePoint lists. The Microfeed list will exist on any site that has the site feed feature activated.


There are three web parts for presenting information from the activity feeds.

  • Microsoft.SharePoint.Portal.WebControls.MicroFeedWebPart
    • This is used to present your activity feed on your personal page
  • Microsoft.SharePoint.Portal.WebControls.PublishedFeedWebPart
    • This is used to present your activity feed on your public profile page.
  • Microsoft.SharePoint.Portal.WebControls.SiteFeedWebPart
    • This is used to present the site activity feed

All web parts inherit from Microsoft.SharePoint.Portal.WebControls.FeedWebPartbase. The web parts themselves don’t do very much, they mostly add information to the HTML markup that can be picked up by JavaScript for asynchronous retrieval. JavaScript is heavily used in the activity feed.


The Activity feed (or MicroFeed in the API’s) have a new namespace; Microsoft.Office.Server.Microfeed (found in Microsoft.Office.Server.UserProfiles.dll)

In these API’s you may need to specify a DefinitionName. i.e. SPMicrofeedPostOptions.DefinitionName. The list over available alternatives seems to be available in the user profile database; in the MicrofeedPostsDefinitions table. The available options as of 2013 Beta is listed at the end.

One thing to be aware of when using the API’s is that they may cross post into multiple sites. If you try to post something to a site feed, a copy of the information is automatically added to the personal feed. Since the target lists are in different site collections and potentially different content databases and web applications, you may encounter permissions issues.

Microfeed definition types


Activity feeds in SharePoint 2013

One feature that has received a major upgrade in 2013 is the activity feed and microblogging infrastructure. The primitive functionality in 2010 has been replaced with functionality that you would expect of a social computing platform.

In SharePoint 2013, this infrastructure is built on the traditional lists, a lot of JavaScript and some server side API’s. The major change from 2010 is that all the content is stored in the user’s personal site, not in a common database. This means that all users have to provision a personal site, something that could have a great impact on your data storage strategy. If you have 10 000 employees using this, you will have 10 000 site collections to keep track of.

The information being published in the activity feed is determined by privacy policies and what you have chosen to expose. The first time you access your My Site, you are asked yo updated the privacy settings.

To start things off, here is a picture of the updated activity feed.

It’s possible to reply and like status updates. It’s also possible to select different views to show different types of activities. i.e mentions.

Using the @notation, it’s possible to mention other people. SharePoint will then provide automatic completion. The # tag syntax is also supported where it will use values from the Taxonomy service.

Another aspect of the activity feed is the site feeds that may exist on sites that you follow. This could be various community sites. The site feed has to be explicitly activated since it’s not on by default.

Once this has been activated, you can cross post into any community you are following.

With this functionality, SharePoint is eating into the territory previously held by companies such as Newsgator. It will be interesting to see how they respond.