Friday, February 21, 2014

Removing people from the SharePoint people picker

For a while now, I've been wondering how to remove people from the SharePoint 2010 people picker (used when adding permissions).  I've had a few occasions where the same person is listed multiple times, due to a bit of a mess-up by my organisation during a few Active Directory migrations.  Each user is normally on a different domain.

No matter how many User Profile syncs I've done, or removed user profiles from the User Profile Service Application, these names are still listed in the people picker.

Finally found a way of removing these accounts once and for all.  Well, there is another way, involving the UserInfo table in WSS_Content database, but that's not recommended by Microsoft.  This is a much safer way.

http://sharepoint/_layouts/people.aspx?MembershipGroupId=0

Simply find the account that needs to be deleted, then click Actions, and then Delete From Site Collection.  Instant result.  Just make sure you don't delete someone's actual user account...

Tuesday, February 18, 2014

Opening PDFs in the browser in Internet Explorer 9

Our SharePoint 2010 site is designed with the intention of opening PDFs in the browser.  For some users, this works as expected.

However, for some users, PDF links from within document libraries opened separately in Acrobat Reader 11.  This was only affecting PDF links automatically generated within a document library view - if a link was placed directly to a PDF file in the left-hand navigation or a content editor web part, the PDF would always open in the browser.

I've tried the usual things - change Browser File Handling Policy from Strict to Permissive, added "application/pdf" to allowed MIME extensions, etc.  I knew the issue was related more specifically to the browser because Google Chrome was able to consistently open PDFs in the browser.

This is occurring because (from what I can tell) Adobe Acrobat Reader 11 is hijacking SharePoint 2010 PDF links in an effort to integrate better with SharePoint.  This is why document library links are acting differently to direct PDF links.  (It's possible to temporarily subvert this "feature" by holding down Ctrl when clicking on the link to the PDF document, which will open in a new tab, but will be in the browser.)

The reason Chrome and other non-IE browsers aren't affected by this is because Chrome et al have their own PDF rendering techniques, whereas IE relies on ActiveX plugins by Adobe or others.

It seems the only way to permanently fix this is a registry hack (from page 124 of the Acrobat Enterprise Administration Guide):

  1. Open the registry.
  2. Go to HKLM\SOFTWARE\Policies\Adobe\<ProductName>\<version>\FeatureLockDown.
  3. Create a key called cSharePoint.
  4. Create a DWORD value called bDisableSharePointFeatures.
  5. Set its value to 1.
Unfortunately, I have to now persuade our IT department to roll out this registry hack to all users...