Installing the WSP-solution UsersADBrowser

  1. Run the SharePoint 2010 Management Shell Console which should be located in Microsoft SharePoint 2010 Products folder of start menu. Remember to use "Run as administrator”
  2. Use the following PowerShell command for adding WSP-solution to the farm
    • Add-SPSolution "C:\<Path to WSP-file>\UsersADBrowser.wsp"
  3. To install the solution use the following "Install-SPSolution" command
    • Install-SPSolution -Identity UsersADBrowser.wsp -WebApplication http://<your_web_application> -GACDeployment
  4. To enable the site collection feature use the "Enable-SPFeature" command
  5. Add a Web Part UsersADBrowser to the page of your web application
  6. Go to the edit mode and set the Web Part parameters

 Web Part parameters

Parameter

Description

LDAP Path start entry

LDAP-path to the Active Directory container

Examples:

  •          LDAP://DC=devdomain,DC=dev
  •          LDAP://OU=EmployeesOU,DC=devdomain,DC=dev

LDAP Users filter

Filter by default selects enabled user accounts whose surnames is not empty

Examples:

  • (&(objectCategory=Person)(objectClass=User)(sn=*)(!userAccountControl:1.2.840.113556.1.4.803:=2))        
  • (&(objectCategory=Person)(objectClass=User)(sn=*))

AD user property attributes for user list (delimiter ",")

A list of system names of AD-attributes separated by commas. The values ​​of these attributes will be displayed in the user list. Localized attribute names are in the global resource file of current web app:

\App_GlobalResources\UsersADBrowser.resx and

\App_GlobalResources\UsersADBrowser.ru-ru.resx

When you add an attribute that is not present in the list by default, you must add it's localized name in resx file. Resource file is a simple XML-file and can be edited in a text editor like Notepad.

Examples:

  • sn,givenName,title,department,telephoneNumber,physicalDeliveryOfficeName,mail
  • displayName,title,department,telephoneNumber,physicalDeliveryOfficeName,mail,manager

AD user property attribute for sorting user list

Examples:

  • snsort by surname
  • displayName – sort by displayName attribute

AD user property attribute for the link to a page with detailed info

Examples:

  • sn
  • displayName

List of names of organizational units that should be excluded  (delimiter ",")

List the names of organizational units Active Directory, which should not appear in the hierarchy tree (users from excluded OUs are not displayed in the user list)

Examples:

  • Domain Controllers,Trash
  • Test OU,Domain Controllers,Trash

View mode

Possible values:

-       Full (a hierarchical list of organizational units and list of users are shown in this mode)

-       UserList (only list of AD-users is shown in this mode)

User Info mode

Possible values:

-       DialogWindow (user info is displayed in a popup DHTML-window)

-       Page (user info is displayed on a separate ASPX-page /_layouts/UsersADBrowser/UserInfo.aspx)

-       ExternalPage (links lead to external page with parameter

?accountname=<user_account>, for example, /my/Person.aspx)

List of Active Directory attributes, which should be displayed in the user info page is defined in the following files

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfoAjax.aspx and

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfo.aspx

For description of parameters, see below under "Parameters of UserInfoControl" section

Address of external page, that displays user info (only for User Info mode = ExternalPage)

Address of the external page to display information about the user (only used when you set parameter “User Info mode” to ExternalPage - see description above)

Show presence information (uses the status of Office Communicator)

Display indicator of presence information.
This feature uses the built-in feature of SharePoint 2010 and is based on Office Communicator client app functionality. Web application must be pre-configured to support feature of displaying presence information. Indicator of presence information works only in Internet Explorer.

Show the user photo

Display photos in the users list or not

Format of url of photos users

It is possible to use variables:

-       {DOMAIN} – replaced by the domain name;

-       {LOGIN} – replaced by the user login;

Examples:

  •  /Photos/_t/{DOMAIN}_{LOGIN}_jpg.jpg
  •  /Photos/{LOGIN}.jpg

Width of photos in list

Width of the images in the user list

Allow sorting If this option is enabled, the user can sort user list by clicking on the column headers.

Caching time of organizational units (minutes)

Cache time in minutes of a hierarchical list of organizational AD units. Default value - 120 minutes.

Caching time of user list (minutes)

Cache time in minutes of user lists. Default value – 120 minutes.

Parameters of UserInfoControl 

List of attributes Active Directory, which should display in the user info page is defined in the following files

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfoAjax.aspx and

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfo.aspx

The first page is used to display a popup window with information about the user, and the second page is used to display user info on a separate page.

Properties of UADB:UserInfoControl 

Parameter

Description

LDAPProperties

A list of system names of AD-attributes separated by commas. The values ​​of these attributes will be displayed in the user info page. Localized attribute names are located in the global resource file of current web app.

Example:

  • displayName,title,department,telephoneNumber,physicalDeliveryOfficeName,mail,manager

IsShowPresence

Possible values: True or False

IsShowPhoto

Possible values: True or False

ImageFormatUrl

Format of images url. See above for similar parameter in the Web Part parameters table.

ImageWidth

The width of the image. If the value 0, then the image is displayed in original size.

CachingTime

Cache time in minutes of user info data. Default value – 20 minutes.

 Design customizing

Customizing the appearance of Web Part UsersADBrowser is possible, through the use of ascx-templates.

Main WebPart template:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\UsersADBrowser\Browser.ascx

Template of User Info:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\UsersADBrowser\UserInfo.ascx

Pages with detailed information about the user:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfoAjax.aspx

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\UserInfo.aspx

Users image by default:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\UsersADBrowser\img\person.png

Last edited Nov 9, 2012 at 4:01 PM by yurax, version 6

Comments

zwforjob Jun 7, 2013 at 4:20 AM 
in the step5,5.Add a Web Part UsersADBrowser to the page of your web application
. there is an error "A Membership Provider has not been configured correctly. Check the web.config setttings for this web application".