Sunday, 5 July 2026

Pull attributes from a People column into another SharePoint column


Sometimes in a SharePoint list you want to display a person's title, department, email address, or other attribute which you can find in their Entra record.

If you want to be able to filter, group or sort using these attributes then you'll need to use a Power Automate flow to pull the data from their user record and populate another column.

But if you just need a read-only field with the data you can extract the attributes and render them in a text field using JSON.

Here is an example list with a Person column (My Colleague) and a single line text field (Department). We want to automatically show the Department information for whoever is selected in the My Colleague column:


Click the arrow next to the Department column header and select Column settings > Format this column:


In the Format view click Advanced mode:

In the JSON text box paste the following JSON and click Save:

{

   "$schema": https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json,

   "elmType": "div",

   "txtContent": "[$MyColleague.department]"

}

The Department value will now be shown in the column:


The key part in the JSON is this line:

"txtContent": "[$MyColleague.department]"

Note the $ sign at the start of the "MyColleague" column name - without that the JSON won't find the right column and therefore won't find the attribute. You can pull out a lot of data using this, including email, title, department, and lots more. 

Because this information is displayed when the screen is rendered it's effectively formatting rather than data, so it can't be downloaded as part of an export, but it's very useful for display purposes and you can also show these attributes in the SharePoint form if you're formatting the header or body with JSON.