このコンテンツはお使いの言語では利用できません。

This article explains how to show custom SharePoint user profile properties in the Vitextra Employee Directory web part when it uses the User profiles data source: how to prepare the property in SharePoint, how to make it available through search, and how to add it to the web part as a custom column.

Introduction

Besides the built-in fields (name, job title, department, phones and so on), the Employee Directory web part can show any additional attribute you need - a cost center, an employee number, a building, a hobby. These additional attributes are called custom columns and are configured in the Custom Columns editor of the web part.

With the User profiles data source, the web part reads employee data through SharePoint search. A custom user profile property therefore becomes available to the web part only after it is indexed by search and mapped to a managed property. The whole process takes three steps:

  1. Create (or reuse) a user profile property and make it indexed.
  2. Map its crawled property to a retrievable managed property in the search schema.
  3. Add the managed property to the web part as a custom column.

💡 Tip
If the web part reads data from Microsoft Entra ID (the Employee Directory (Entra ID) web part, or Employee Directory with the Entra ID (Azure AD) data source), custom attributes work differently. See KB10060. How to Display Custom Entra ID Attributes in the Employee Directory Web Part.

Prepare the user profile property

The steps in this section are done in the SharePoint admin center and require SharePoint administrator rights. If the property you want to show already exists and is mapped to a managed property, skip to Add the custom column to the web part.

Create the user profile property

  1. In the SharePoint admin center, go to More features, and under User profiles select Open.
  2. Under People, select Manage User Properties, and then select New Property.
  3. Enter the Name (the internal name, for example CostCenter), the Display Name and the Type.
  4. Under Search Settings, select Indexed. Without this option the property is not crawled and can't be shown by the web part.
  5. Set the policy and edit settings as your organization requires and select OK.

Fill in the property for your users - in the profile, by your import process or by a script. Search creates the crawled property People:<Name> (for example People:CostCenter) when it crawls profiles that have a value for the property.

💡 Tip
See the How to Create a Custom Searchable User Profile Property guide for more details.

Map it to a managed property

  1. In the SharePoint admin center, go to More features, and under Search select Open.
  2. Select Manage Search Schema.
  3. Choose a managed property for the value. The easiest option is one of the unused built-in properties RefinableString00–RefinableString99: they are already queryable, retrievable, refinable and sortable. You can also create a new managed property of type Text with the Retrievable option turned on.
  4. Open the managed property, and under Mappings to crawled properties select Add a Mapping, find People:<Name> and add it.
  5. Save the managed property.

❗ Important
The managed property must be Retrievable; otherwise search does not return its value and the custom column stays empty. Changes to the search schema take effect only after the user profiles are crawled again, which can take from several hours to a day or more in large tenants.

Write down the exact name of the managed property, for example RefinableString05 - you'll enter it in the web part.

Add the custom column to the web part

  1. Open the page with the Employee Directory web part, select Edit, and then select the edit (pencil) icon of the web part to open its property pane.
  2. In the Data Source section, make sure Data Source is set to User profiles.
  3. Under Custom Columns, select Configure.

The Custom Columns property in the Data Source section

The Custom Columns property in the Data Source section
  1. The Columns panel opens. In the empty row at the bottom of the table, enter the managed property name in Column and the label your users will see in Caption, and choose where the column is shown.
  2. Select Add new item (the plus icon at the end of the row). The column is added to the table. Repeat for each attribute you need.
  3. Use Order to change the position of the columns, and select Save.
  4. Republish the page.

Custom columns for the User profiles data source

Custom columns for the User profiles data source

Each custom column has the following settings:

SettingDescription
Show in listShows the attribute as a column in the Details view and includes it in the Excel export. Selected by default for a new row.
Show on cardShows the attribute in the employee details pane that opens when you select a person.
ColumnThe managed property name, for example RefinableString05. Enter it exactly as it is spelled in the search schema. Required.
CaptionThe label shown as the column header and in the details pane, for example Cost Center. Required.
OrderThe position of the column among the custom columns. Custom columns are placed after the built-in columns.

To remove a custom column, select Delete Row (the trash can icon) at the end of its row and then select Save. Cancel closes the panel without applying your changes.

📝 Note
The Employee Directory web part keeps one list of custom columns for both data sources. If you switch Data Source between User profiles and Entra ID (Azure AD), review the custom columns: managed property names are valid only for User profiles.

Where custom columns appear

Once saved, a custom column can be used in the same places as the built-in fields:

  • Details view - as a column of the list, when Show in list is selected.
  • Details pane - below the built-in attributes, when Show on card is selected and the person has a value. See KB10199. Employee Directory: Customizing the Details Pane.
  • Contact cards - as one of the card lines selected in the Content Fields section.
  • Group by - the Group by dropdown in the Appearance section lists every custom column, so you can group people by, for example, cost center or building.
  • Export to Excel - columns with Show in list selected are included in the exported spreadsheet.
  • Refinement panel - a refinable managed property (such as RefinableString05) can also be added as a refiner. See KB10313. How to Set Up the Refinement Panel in Employee Directory.

Custom attributes in the details pane

Custom attributes in the details pane

If a custom column is empty

If the column or the details pane shows no value, check the following:

  • The user profile property is marked Indexed, and the person actually has a value for it.
  • The crawled property People:<Name> is mapped to the managed property, and the managed property is Retrievable.
  • Profiles have been crawled since you changed the search schema - new mappings are not applied immediately.
  • The name in Column matches the managed property name exactly.

The details pane shows a custom attribute only when it contains data, so an empty value is simply not displayed.

Microsoft Entra ID data source

When the web part reads data from Microsoft Entra ID through Microsoft Graph, a custom column refers to a property of the Entra ID user object - a standard user property, a directory extension (extension_{appId}_{name}) or one of the on-premises extension attributes extensionAttribute1–extensionAttribute15 - instead of a managed property. The search schema is not involved.

💡 Tip
For the supported attribute types, how to find their names and the extra Searchable option of the Employee Directory (Entra ID) web part, see KB10060. How to Display Custom Entra ID Attributes in the Employee Directory Web Part.

質問と回答

この記事について質問すると、サポートチームから公式回答を受け取れます。

まだ質問はありません。最初の質問を投稿しましょう。

注目の記事

Questions and Answers のコメント、@メンション、ディープ リンク

Vitextra Questions and Answers Web パーツのコラボレーション機能に関するリファレンスです。標準の SharePoint リスト コメントとしての質問へのコメント、コメント数と長い議論の折りたたみ、ライブ プロファイル カードとして表示される @メンション、コメントできるユーザーとコメントの無効化方法、そしてディープ リンク (リンクをコピー ボタン、?questionId=N アドレス、リンクされた質問の展開・強調表示・取得の仕組み、サポート業務でのリンクの活用) を説明します。

26 2 分
大規模リストのフィルター処理: インデックス付き列と 5,000 アイテムのしきい値

5,000 アイテムを超える SharePoint Online リストでフィルター処理が失敗する理由、Vitextra List Filter Online Web パーツがインデックスのないフィルター列を警告しその場でインデックスを作成する仕組み、リストの設定でインデックスを追加する方法、大規模リストでも動作し続けるようにフィルター・並べ替え・グループ化を設計する方法を説明します。

88 2 分
Employee Details: 役職、部署、連絡先情報の変更を依頼する方法

Vitextra Employee Details で、役職、部署、会社、オフィス、電話番号、住所の変更を依頼する方法を説明します。「変更を要求」ボタンの場所、変更できるプロパティ、入力する内容、送信後の流れ、ボタンが表示されない理由がわかります。

100 1 分

共有