Skip to content
SharePoint Lösungen & Produkte

Development of a SharePoint Phone Directory Web Part

Our SharePoint phone directory web part lists members of configured Active Directory or security groups and displays details like job title, phone and email.

We recently received a request from a customer to build a SharePoint phone directory. The goal was to display users from Active Directory groups and security groups. For each person, the customer wanted to show information such as job title, phone number, email address, and more. In this post, we share how we built this SharePoint phone directory web part.

Default SharePoint People web part vs. our phone directory web part

SharePoint Online includes a default People web part that can show user profiles. However, the customer would have to add every user manually. Whenever group membership changes, it would also need to be updated by hand. To keep the effort as low as possible, the customer asked that all users of a configured Active Directory group or security group be displayed automatically.

We implemented the phone directory as an SPFx web part. An admin can configure the groups in the web part properties.

SharePoint phone directory: Web part settings

We read user information via the Microsoft Graph API and render it in the web part. When you hover a user, the component shows their details in a popover—the same behavior as the default People web part.

SharePoint phone directory: User information

Sorting users via drag & drop

Another requirement was the ability to order users within a group. We implemented this with drag and drop. When the page is in edit mode, drag and drop becomes active, and an admin can arrange users in the desired order.

SharePoint phone directory: User sorting

We store the order per group in a configuration file in SharePoint. On page load, we read the configuration and sort the users accordingly.

{
  "groups": [
    {
      "title": "Test",
      "orderedUserIds": [
        "flo@openinnovationhub.onmicrosoft.com",
        "verena@openinnovationhub.onmicrosoft.com",
        "josef@openinnovationhub.onmicrosoft.com",
        "cerima@openinnovationhub.onmicrosoft.com"
      ]
    }
  ]
}

Update: If the requirement is not just to display groups automatically as a phone directory, but to provide intranet people search with skills, profile maintenance, and search context, we describe the newer approach in SharePoint Intranet Phone Directory with a Skills Feature.

  • Microsoft 365
  • O365
  • SharePoint
  • SPFx web part
  • User adoption

Related articles

Collect Additional Event Registration Details at

Collect Additional Event Registration Details at Sign‑Up

Collect extra registration details at booking — companions, dietary needs, headcount — and store them in SharePoint so attendees can edit information later.

Read more
Best Way to Link SharePoint Wiki Pages in Navigation

Best Way to Link SharePoint Wiki Pages in Navigation

Use Smarter Navigation to build a hierarchy of SharePoint wiki pages. Link pages in navigation and add via drag and drop on team and communication sites.

Read more
Manage Word Text Blocks Centrally with an Add-in

Manage Word Text Blocks Centrally with an Add-in

Discover our Word add-in: insert SharePoint list data as reusable text blocks via HTML templates with one click — for consistent documents and less effort.

Read more

Questions about this topic?

We are happy to help you put this into practice in your environment.