How to create an address book in SharePoint Online

In this post we take a look at a few of the different ways an address books can be created in SharePoint Online.

  1. Intro
  2. Example 1 – dynamic list filtering
    1. Create the alphabet list
    2. Create the contacts list
    3. Create the address book page
    4. Bonus! Populate the contacts list from M365 user data
  3. Example 2 – Custom SharePoint Framework address book web parts
    1. People Directory SPFx sample
    2. Organization Directory SPFx sample

Intro

The idea for this post came from reader George’s comment asking to do a demo of how an address book can be created in SharePoint. From my research there is already quite a bit out there on how to do this already, but here are my two ways to create an address book.

Example 1 – dynamic list filtering

This example is a pure out of the box, SharePoint solution for creating an address book feature. For this example we will use dynamic filtering between two lists to show a certain set of values when an option is selected.

To start we will need to create two lists:

  1. An alphabet list that will act as our index, storing all the letters of the alphabet as list items.
  2. A contacts list that will be the list that contains all the address book data.

Create the alphabet list

  • Start by creating a new custom list > call the list Alphabet.
  • Create new items in the list for each letter of the alphabet. I used ‘edit in grid mode’ to speed this process up
Create an Alphabet list to store the A-Z letters as list items.
  • Change the view to a gallery view
  • From here, format the list view using either the example JSON list view formatting below, or create your own to style the A-Z list to display each letter as a button
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
  "height": 45,
  "width": 53,
  "hideSelection": false,
  "fillHorizontally": true,
  "formatter": {
    "elmType": "div",
    "attributes": {
      "class": "sp-card-container"
    },
    "children": [
      {
        "elmType": "button",
        "attributes": {
          "class": "sp-card-defaultClickButton",
          "role": "presentation"
        },
        "customRowAction": {
          "action": "defaultClick"
        }
      },
      {
        "elmType": "div",
        "attributes": {
          "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer"
        },
        "children": [
          {
            "elmType": "div",
            "attributes": {
              "class": "sp-card-lastTextColumnContainer"
            },
            "children": [
              {
                "elmType": "p",
                "attributes": {
                  "title": "[$Title]",
                  "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent"
                },
                "txtContent": "=[$Title]",
                "style": {
                  "text-align": "left",
                  "font-size": "0.8em",
                  "font-weight": "bold"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
  • Save your view under a new name, I called mine “alphabet filter view”. The end result will look like the below:
Example gallery list view formatting to display A-Z as buttons.

NOTE: There was an original example for this I found online many months ago, but I cant for the life of me find it. If anyone knows where this example came from, leave a message in the comments and I’ll credit it in this post.

Create the contacts list

Next, we need to create the contacts list. If you already have your user data held somewhere else, you can always create your new contacts list from Excel.

  • Once the contacts list is created, create a new lookup column with the following configuration:
    • Give your lookup column a name. I called mine “AZLookup”
    • Require that this column contains information = No
    • Enforce unique values = No
    • Get information from: Alphabet
    • In this column: Title
    • Press Save
Create a lookup column to connect to the Alphabet list.
  • Now you need to update each item in the contacts list, to ensure each item has an A-Z value in the lookup column. Again, for this I used “edit in grid view” to speed things up.
Update the contacts list to include values in the lookup column.
  • Switch to the gallery view and format the list using either the example JSON list view formatting below, or create your own to style the contacts list in a way that suits your needs.
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
  "height": 166,
  "width": 300,
  "hideSelection": false,
  "fillHorizontally": true,
  "formatter": {
    "elmType": "div",
    "attributes": {
      "class": "sp-card-container"
    },
    "children": [
      {
        "elmType": "button",
        "attributes": {
          "class": "sp-card-defaultClickButton",
          "role": "presentation"
        },
        "customRowAction": {
          "action": "defaultClick"
        }
      },
      {
        "elmType": "div",
        "attributes": {
          "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer"
        },
        "children": [
          {
            "elmType": "div",
            "attributes": {
              "class": "sp-card-previewColumnContainer"
            },
            "children": [
              {
                "elmType": "div",
                "style": {
                  "display": "flex"
                },
                "children": [
                  {
                    "elmType": "p",
                    "attributes": {
                      "class": "sp-card-userEmptyText"
                    },
                    "txtContent": "=if(length([$DisplayName]) == 0, '–', '')"
                  },
                  {
                    "forEach": "personIterator in [$DisplayName]",
                    "elmType": "a",
                    "attributes": {
                      "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                    },
                    "style": {
                      "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                    },
                    "children": [
                      {
                        "elmType": "img",
                        "defaultHoverField": "[$personIterator]",
                        "attributes": {
                          "src": "=getUserImage([$personIterator.email], 'S')",
                          "title": "[$personIterator.title]",
                          "class": "sp-card-userThumbnail"
                        },
                        "style": {
                          "display": "=if(length([$DisplayName]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                        }
                      },
                      {
                        "elmType": "div",
                        "attributes": {
                          "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                        },
                        "style": {
                          "display": "=if(length([$DisplayName]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                        },
                        "customCardProps": {
                          "formatter": {
                            "elmType": "div",
                            "attributes": {
                              "class": "sp-card-personCallout"
                            },
                            "children": [
                              {
                                "forEach": "personIterator in [$DisplayName]",
                                "elmType": "div",
                                "attributes": {
                                  "class": "sp-card-userContainer sp-card-userCustomCard"
                                },
                                "style": {
                                  "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                },
                                "children": [
                                  {
                                    "elmType": "img",
                                    "defaultHoverField": "[$personIterator]",
                                    "attributes": {
                                      "src": "=getUserImage([$personIterator.email], 'S')",
                                      "title": "[$personIterator.title]",
                                      "class": "sp-card-userThumbnail"
                                    }
                                  }
                                ]
                              }
                            ]
                          },
                          "openOnEvent": "hover"
                        },
                        "children": [
                          {
                            "elmType": "span",
                            "txtContent": "='+' + toString(length([$DisplayName]) - (4))"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "elmType": "div",
                    "attributes": {
                      "class": "sp-card-userTitle"
                    },
                    "style": {
                      "display": "=if(length([$DisplayName]) == 1, '', 'none')"
                    },
                    "defaultHoverField": "[$personIterator]",
                    "txtContent": "[$DisplayName.title]"
                  }
                ]
              }
            ]
          },
          {
            "elmType": "div",
            "attributes": {
              "class": "sp-card-displayColumnContainer"
            },
            "children": [
              {
                "elmType": "p",
                "attributes": {
                  "title": "[$FirstName]",
                  "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
                  "role": "heading",
                  "aria-level": "3"
                },
                "txtContent": "=if ([$FirstName] == '', '–', [$FirstName])"
              }
            ]
          },
          {
            "elmType": "div",
            "attributes": {
              "class": "sp-card-displayColumnContainer"
            },
            "children": [
              {
                "elmType": "p",
                "attributes": {
                  "title": "[$Surname]",
                  "class": "ms-fontColor-neutralPrimary sp-card-content "
                },
                "txtContent": "=if ([$Surname] == '', '–', [$Surname])"
              }
            ]
          },
          {
            "elmType": "div",
            "attributes": {
              "class": "sp-card-lastTextColumnContainer"
            },
            "children": [
              {
                "elmType": "p",
                "attributes": {
                  "title": "[$Email]",
                  "class": "ms-fontColor-neutralPrimary sp-card-content "
                },
                "txtContent": "=if ([$Email] == '', '–', [$Email])"
              }
            ]
          }
        ]
      }
    ]
  }
}
  • Save the view and give it a new name. I called mine “Contact cards”. The result will look like the below:
Contacts list with list view formatting applied.

Create the address book page

Now are lists are created and formatted, it’s time to create a new page, add our web parts and start dynamic filtering!

  • Create a new page, select any template you like
  • In a new one column section, add a new list web part > select the Alphabet list
  • Edit the web part and make the following changes:
    • Change the view to Alphabet Filter View
    • Set the size to small – about 5 items
    • Hide the command bar
    • Hide the see all button
  • Press Apply
  • Either in the same or new one column section, add a new list web part > select the Contacts list
  • Edit the web part and make the following changes:
    • Change the view to Contact Cards
    • Set the size to autosize – fit to number of items
    • Hide the command bar
    • Hide the see all button
    • Turn dynamic filtering on
    • Column in Contacts to filter = AZLookup
    • List or library containing the filter value: Alphabet
    • Column containing the filter values properties: Title
  • Press Apply

You will now be able to dynamically filter your contacts list using the A-Z buttons on the address book page!

Bonus! Populate the contacts list from M365 user data

When creating this demo I thought to myself “wouldn’t it be great if you could populate the contacts list from data already in Microsoft 365”. I thought it was a good idea so I created a Power Automate flow to get all the user data from M365 and add it to the contacts list.

Power automate flow to populate the contacts list with user data from Microsoft 365.

The flow uses the search for users (V2) action that, if no search terms are added, will bring back all the users within Microsoft 365 within the flow. Once that action has retrieved all the users, the create item action, wrapped within an apply to each creates a new item within the contacts list for each user the search for users action has found, populating the columns in the contacts list with dynamic content from the previous action.

NOTE: There is a pagination setting that will need updating if you have more than the threshold limit of 1000 users.

Pagination setting within the search for users (V2) action.

This flow was really just to prove the concept, so it runs on a manual basis. If you were to want to do something like this I would suggest having a one time “import of all the user profile data into the contacts list, then a separate, flow that runs on a longer schedule that only runs if certain conditions are met (for example: if the email address doesn’t already exist in the contact list).

Example 2 – Custom SharePoint Framework address book web parts

There are several SharePoint framework (SPFx) sample solutions available from GitHub that work as address books, connecting to user data in Microsoft 365 and allowing you to browse and search for users. Not all samples are offered as downloadable solutions packages, sometimes you will need to package & deploy them manually. I’ve got a post here that covers everything you need to do 🙂

People Directory SPFx sample

This sample was made available as part of the PnP starter kit (formerly the SharePoint starter kit), which I installed and have been using in my tenant since 2019 without issue. This web part lets you browse an A-Z, as well as being able to search for users.

People Directory SPFx sample.

This web part can be downloaded from GitHub and installed into your tenant.

Link to the sample: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-people-directory

Organization Directory SPFx sample

This sample allows you to browse an A-Z, as well as being able to search for users and sort the results by job title, first name, last name etc. When a user is found, a profile hover card is displayed is the same as the rest of Microsoft 365.

Organization Directory SPFx sample.

This web part needs to be packaged into a solution before installing into your tenant.

Link to sample: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-directory


Advertisement

Two ways to remove search results in SharePoint

In this post we will take a look at two different ways to remove search results in classic and modern SharePoint.

Introduction

There may be occasions in SharePoint where you are required to remove an item, or items from the search results. When we are talking about search results, we are referring to the items that are returned when a user initiates a search in SharePoint.

Search results in modern SharePoint.

Click on one of the buttons below to find out more about how you can remove search results in both classic and modern SharePoint:

How to convert SharePoint pages into PDF files

In this post we step through how you can use Power Automate to convert modern SharePoint pages into PDF files and save them to a document library.

Intro

Recently I got asked to come up with a way to turn SharePoint pages into PDF files for use in an offline scenario. The converted SharePoint pages didn’t need to be formatted as it was only the body content of a SharePoint page that was needed. Also part of the brief was that when the SharePoint page is updated, the corresponding PDF file also updates.

There are several posts online that cover very topic this that I’ll reference at the end, but they didn’t quite do exactly what I wanted – so here’s my take on how to convert SharePoint pages into PDF files!

What you’ll need

  • A modern SharePoint site pages library (these come with every SharePoint site!)
  • A OneDrive location to temporarily store the SharePoint page outputs
  • Power Automate to build the automation
  • A document library to store the output PDF files

A note on the site pages library

In my example I didn’t want all the site pages to be converted into PDF files, so I added a choice column to ‘tag’ all the pages that should be converted. I set the default value of the choice column to be ‘Site Page’, so that the only pages that get converted are the ones I’m interested in. This is reflected in the flow below with the condition step.

Add a choice column to ‘tag’ the pages you wish to convert to PDF.

Building the flow

The trigger action for our flow is when a file is created or modified (properties only). This allows us to re-run the flow when SharePoint pages are updated to also update the PDF files.

  • Select the site you are using to create the SharePoint pages in site address (If you don’t see it listed just press enter custom value and paste the URL in)
  • Select the Site Pages library under library name

Next, I’ve added a condition to only convert pages that have been tagged ‘Runbook’ to PDF.

Condition: if Document type value is equal to ‘Runbook’.
  • Note: make sure you select the Value dynamic content for your choice column, rather than the choice column itself as that will break your flow.

If yes, next is a send an HTTP request to SharePoint step. Here I’m using a REST API call to get the body content of the SharePoint page.

Use a send an HTTP request to SharePoint step to get the body content of your page.
  • Set the site address to the site in question
  • Set method to GET
  • Enter the following in Uri:_api/web/lists/GetByTitle('Site%20Pages')/items('ID')/CanvasContent1
  • Replace ‘ID’ with the dynamic content ID from the when a file is created or modified step

Note: The output of this step generates some additional stuff you probably won’t want in your PDF like this:

 "d": { "CanvasContent1": "}}

I used the parse JSON step to remove the unwanted mark up and just get the plain text from the body content.

  • I added the body dynamic content from the send an HTTP request to SharePoint step in the content field in the parse JSON step
  • I copied the the output body from send an HTTP request to SharePoint of a successful run in flow history and pasted it into the parse JSON step
Output body from send an HTTP request to SharePoint to paste into the parse JSON step from a successful flow run.
  • I then pressed generate from sample, which output the following:
{
    "type": "object",
    "properties": {
        "d": {
            "type": "object",
            "properties": {
                "CanvasContent1": {
                    "type": "string"
                }
            }
        }
    }
}

Parse JSON step with generated schema.

From this I then used a create file action to create a temporary HTML file in OneDrive (more on this later), with the following config:

  • Folder path: / (root of the OneDrive account)
  • File name: Name from when a file is created or modified step
  • File content: CanvasContent1 from the parse JSON step
Create file action to create temporary HTML page in OneDrive.

Next, a convert file step to convert the HTML page into a PDF file:

  • File: ID from the create file step
  • Target type: PDF

Now we can use a create file action to create a PDF in our output document library in SharePoint:

  • Set the site address to the site you want to store the PDF files in
  • Set the folder path to the document library, or navigate to the relevant folder within that library
  • Set file name to file name from the convert file step
  • Set file content to file content from the convert file step
The create file action creates the PDF file in the destination document library.

I then used an update file properties action to pass metadata from the site pages library to the destination document library – this step is optional. Finally, a delete file action to delete the temporary HTML file from the OneDrive we created earlier:

Delete file action to remove the temporary HTML file.

Here’s the flow in it’s entirety:

Issues & troubleshooting

Formatting issues with the send an HTTP request to SharePoint

As mentioned above, when just using the send an HTTP request to SharePoint action, the output contains mark up that isn’t going to make sense within the PDF. The parse JSON action cleans this up and just leaves the body content of the page.

Create file action creates corrupt PDF files

When testing this flow out I originally didn’t have the convert file action in place. In the file name I added ‘.PDF’, but every time the output PDF was corrupt and errored like this when trying to open:

The flow also failed on this step and the error said that “Conversion of this file to PDF is not supported. (InputFormatNotSupported / pdf)”. I decided to scrap this approach and create a HTML page and add in the convert file action which worked around this issue.

Overwriting existing PDF files causes flow to fail

During testing of this flow I also noticed that when triggering the flow based off updating a site page, the create file create file action would error with a status 400 error saying “A file with the name [file name] already exists”.

I’ve wrote a separate post on how to overwrite files using the create file action, but basically the answer was to turn off chunking within the actions settings.

References


This page is not using a valid page layout – how to fix

This post describes an issue when trying to view classic publishing pages in SharePoint Online and how to resolve.


The issue

After migrating publishing sites from SharePoint 2010 – SharePoint Online, I encountered an issue with classic SharePoint Server publishing pages. Post-migration, some publishing pages wouldn’t open and displayed this error message:

Fix publishing pages with custom page layouts created from template - HANDS  ON SharePoint
Now another issue with this was that quite often the publishing pages affected were the migrated sites’ homepage – rendering the whole site inoperable! Microsoft have an article on the issue here and state that the cause is that “The .aspx page is using an invalid page layout, or the current layout is corrupt”.

Resolution

The Microsoft documentation on how to resolve this is pretty good, but I found it didn’t quite get me to fix my issue. Here’s what I did:

  • Navigate to Site Content & Structure: /_layouts/sitemanager.aspx. NOTE: You need to be a SharePoint admin to access
  • Open the Pages library > find your broken page > click on the drop-down button and press edit page settings
  • Select the (Welcome Page) Blank Web Part Page layout
  • Press OK

When I had to do this for my broken pages, there was a warning message above the page layout that said “Current page layout is not valid. Please select a valid page layout from the drop down list below”. I just selected the (Welcome Page) Blank Web Part Page layout anyway, pressed OK and it worked.


How to overwrite files using the create file action in Power Automate

In this post we explore a common error experienced when trying to update existing files in SharePoint using the create file step in Power Automate – and how to resolve it.

The problem

I recently ran into an issue seemingly many others have encountered when trying to update an existing file in SharePoint using the create file step in Power Automate. When running my flow, I received the following error:

Bad Request error in Power Automate when trying to use the create file step to update an existing file in SharePoint.
  • Bad Request status: 400
  • Message: A file with the name [NAME OF FILE] already exists. It was last modified by [NAME OF USER] on [DATE]

The solution

The solution to this has already been shared a fair few times via the Power Automate blogs, but here it is:

  • Press the ellipsis … > settings within the create file step
Open the ellipsis and press settings within the create file step.
  • Scroll down until Content Transfer > set allow chunking to off
  • Save and re-run your flow

That’s it, now when I use the create file step to update existing files, it runs successfully!

Note: Chunking of content is used for splitting up large content for downloads/ uploads. You may need to consider this before turning off chunking in your flow. More information on chunking can be found here.


The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web – how to fix

In this post we describe an issue observed within a SharePoint 2010 environment where files could not be uploaded or edited and users received a “nonexistent file or folder” message, plus explain how to resolve.

The problem

Reports started coming in from users that when they tried to upload files or edit properties within a single site collection they received the following error message:

The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

Over the course of a couple of days, the changed and instead of seeing the above error the window would just hang when uploading files/ editing properties and users would see a “processing” message:

Processing message appears and does nothing when users upload files/ edit properties.

In this example, there is one, very large document library that was most affected by this issue within the site collection. So the first thing I did was take a look at the files with no checked in version within the document library settings.

I found that there was close to 1000 files with no checked in version. When trying to open the checked out files page it took an age until finally opening. I was unable to take ownership of all of the files and check them in, but this didn’t make any difference to the issue.

We have set up nightly IIS resets on our web front end servers so overnight this took place in the hopes restarting the web services might help, but this also didn’t fix anything.

The solution

After the IIS reset, I began looking into the SQL server too see if space was the issue. Sure enough I found that one of the drives that hosted the content database related to the site collection in question had less than 10MB free space!

So for us the solution was a simple one, we increased the space on the full drive and the issue went away. Users are once again able to upload files/ edit properties within the site collection.

Other common suggested fixes to try

In writing this post, I researched many of the other suggested fixes for this issue – so here’s a list:


How to find the internal name of list or library columns

This post is a guide on how to find the internal name of columns within Microsoft lists or document libraries in SharePoint.


In this post:

Intro
Option 1: list/ library settings
Option 2: sort or group by the column
Option 3: REST API request
Option 4: Microsoft Graph Explorer

Intro

Columns in Microsoft Lists/ SharePoint lists & libraries have two main names – their display name that you can see within the list or library and their internal name. Sometimes you may be required to use a column’s internal name (for example: when creating column/list view formatting). There are several ways to do this, depending on the column so take a look below for more:

NOTE: In the examples below I will be focusing on lists, but the same applies for document libraries.

Option 1: list/ library settings

This is by far the easiest way to get the internal name of a column. All internal custom columns, plus several of the out-the-box column names within lists or libraries can be found by heading to list settings and clicking on the column itself:

  • Press the cog > list/ library settings
Press list settings from the cog menu.
  • Scroll down until you see columns > select the column
  • The Field= end part of the URL in the browser will show you the internal name of your column (Modified By in my example)
Editing the column will show you the internal name of the column from the Field= part at the end of the URL .

Option 2: sort or group by the column

Some out-the-box columns don’t appear within list settings, but you can still get their internal name by either grouping or sorting based on the particular column. For example, the file size column is an out-the-box column that isn’t you won’t find in list settings. If you add this column to your list/ library view and sort you can get access to the internal name:

  • Click on the drop-down and press show/ hide columns
  • Select the column you wish to add > tick it > press apply
  • Select the drop-down next to your newly added column > either sort by or group by depending on what is available
    • For sorted columns – look for the sortField part of the URL to get the internal name of your column
URL example to find the internal name of sorted columns
  • For grouped columns – look for the groupBy part of the URL to get the internal name of your column
URL example to find the internal name of grouped columns.

Option 3: REST API requests

SharePoint has a REST API service that allows you to perform CRUD operations by using REST HTTP requests. There is much more information about the SharePoint REST service here, but you can use GET requests via the browser to return information as per your requirements.

In our example, we want to return all the internal column names from a given list. To do this we simply need to send a REST request to SharePoint as follows:

https://[YOUR SITE].sharepoint.com/_api/Web/Lists(guid'[YOUR GUID]')/Fields

This will return a huge wall of text, but if you CTRL+F and search for the name of your column or use a code editor you will find the internal name and display name:

Option 4: Microsoft Graph

You can also use the MS Graph Explorer to do something similar to a REST API request. The graph explorer allows you to create a run requests via an easy to use interface that also shows you the results. In our example I ran the following GET request via graph explorer:

https://graph.microsoft.com/v1.0/sites/[YOUR TENANT].sharepoint.com/sites/[YOUR SITE]/lists/[YOUR LIST]/Columns
Entering the above request in Graph Explorer will return you all the internal column names in your list.

Which allowed me to look through the response preview to find my file size column’s internal name:


Description column in SharePoint libraries – how to use

In this post we take a look at the description column that is available within SharePoint Online document libraries and how to make use of it.


There is a description column available in modern SharePoint document libraries. This description column comes out of the box when you create a new document library, or when you add/remove columns from the existing Shared Documents library that comes with every Team/ SharePoint site.

The problem

The description column exhibits some very strange behaviour. First of all, when you try add it to a library view it does not appear within the properties pane, nor is it a column you can add via edit “columns”.

When adding the properties column to document library views you are not able to edit the column.

If you add the column into a document library view and switch to edit in grid view mode, the column becomes read only meaning you can’t add anything into any of the cells within the library.

If you try to edit the column via edit in grid view the cells within the library are read-only.

The solution

This is more of a workaround than a solution as this appears to be a bug rather than desired behaviour. If you make the column mandatory, then optional it seems to do the trick! To do this:

  • Left-click on the Description column heading > column settings > edit
  • Press more options > set require that this column contains information to yes
  • Press save
Set the Description column to required, then optional to enable editing.
  • With this setting changed, when you edit your document library in grid view now you are able to enter data into the Description field
Once you have made the Description column required, you are able to add data via grid view.
  • Go back to edit the Description column settings and switch off require that this column contains information to make it optional

Add Description column to properties pane

Although the above will allow you to add data to the Description column, it will not add the Description column into the properties pane. You can get the Description column to appear by adding it to the default content type in the document library. Here’s how you can do it:

  • Press the cog > library settings
  • Under general settings > advanced settings
  • Set allow management of content types to yes
  • Press OK
Set allow management of content types to yes in the document library.
  • Scroll down to content types > select the document content type
  • Press add from existing site or list columns
Press add from existing site or list columns to add the Description column to the Document content type.
  • Ensure the Description column is selected > press add
  • Press OK
Add the Description column into the Document content type.

Go back to your document library, select a document and open the properties pane. You will now see the Description column is displayed in the properties pane, as well as being an editable field when you press edit all.

Bonus! History lesson and give your feedback

This description column appears to be a rather recent addition to all tenants, making it’s appearance in summer 2021 with the advent of Microsoft Lists. I went back to SharePoint 2010 just to double-check and sure enough the Description column was not present!

Out of the box SharePoint 2010 document library with no description column.

I’ve added a new item to the Microsoft feedback portal (UserVoice replacement) in the hope this gets addressed by the SharePoint product team so if you could upvote it that would be great!