Organization Browser web part does not render for Windows Claims users

Article ID: 2643420 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

When using the Organization Browser Web Part on Windows Claims enabled sites, the web part does not render any information. The same web part renders users with different Claims Authentication types correctly. 

Cause

The organization information is pulled from the profile database of the User Profile Service Application (UPSA). The required information is stored in the UserProfile_Full table.

Active Directory users (either added manually or synchronized automatically) are stored in the UPSA Profile Database with NETBIOS\LogonName (Ex.: CONTOSO\TestUser1) format.

When browsing a claims site however, the user context uses the Claims NTName format. (Ex.: i:0#.w|Contoso\TestUser1)

The Organization Browser web part then does a database lookup for the user 'i'0#.w|Contoso\TestUser1' which is not available in the database since the user information will be stored with the 'CONTOSO\TestUser1'  NTName.

The issue does not happen with any other Claims Authentication type as the Profile Database contains the correct naming format for them.

Resolution

The Organization Browser Web Part control is rendered on the page by the CreateHierarchyChartControl javascript function. This function is not aware of the fact that the UPSA Profile Database stores the Windows Claims users with a different naming format. To work around this, the below code snippet must be entered in to the site source right after the Organization Browser web part.

<script type="text/javascript">
 function CreateHierarchyChartControl(parentId, profileId, type, persistControlId) {
  var i = profileId.indexOf("|");
  var claimsmode = profileId.substr(i-1,1);
  if((i >=0 ) & (claimsmode=="w"))
  {
   profileId = profileId.substr(i+1,profileId.length-i-1);
   var initParam = profileId + ',' + type + ',' + persistControlId;
   var host = document.getElementById(parentId);
   host.setAttribute('width', '100%');
   host.setAttribute('height', '100%');
   Silverlight.createObject('/_layouts/ClientBin/hierarchychart.xap',
    host,
    'ProfileBrowserSilverlightControl',
    {
     top: '30',
     width: '100%',
     height: '100%',
     version: '2.0',
     isWindowless: 'true',
     enableHtmlAccess: 'true'
    },
    {
     onLoad: OnHierarchyChartLoaded
    },
     initParam,
     null);
    }
  }
</script>

Method 1: Add a Content Editor Web Part to the page

  1. Edit the page that contains the Organization Browser web part.
  2. Add a Content Editor Web Part right after the Organization Browser Web Part.
  3. Edit the content.
  4. In the Ribbon, click on HTML/Edit HTML Source under the Format Text tab.
  5. Copy-paste the code above.
  6. Hide the Chrome and the content of the web part so that it would not appear on the page.

Method 2: Edit the page in SharePoint Designer

Please note that this method will detach the page from the site definition, and as such must be used with caution.
  1. Open the page in SharePoint Designer for editing.
  2. Change to code view.
  3. In the Ribbon, click Advanced Mode
  4. Locate the </SharePoint:EmbeddedFormField> tag.
  5. Paste the above code right after the tag.
  6. Save your changes.
  7. Click Yes in the Site Definition Page Warning window.

More information

Please note that it not possible to overwrite the Html View of the Organization Browser web part from the client. If you need to have a non-Silverlight control available, you will need to write a custom web part to achieve this goal with Windows Claims.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2643420 - Last Review: May 14, 2013 - Revision: 6.0
Applies to
  • Microsoft SharePoint Server 2010
  • Microsoft SharePoint Server 2010 Service Pack 1
  • Microsoft SharePoint Server 2013
Keywords: 
KB2643420

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com