0

I have a SharePoint list with a column called 'Name' (Person/Group type) where you can select a name from Active Directory.

I have then set up JSON formatting to auto populate the Email column. I'm using the following code:

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "[$Name.email]"
}

I would also like the Office Location to be auto populating in a similar way, but I cannot achieve this by modifying the above code. My proper name for that location column is:

Faculty_x0020__x002f__x0020_CPS

Would you have any advice? How do I reference the 'Office Location' Active Directory entry?

1
  • Are you trying to bring active directory property (Office Location) in list using JSON formatting? Commented Mar 31, 2023 at 11:30

1 Answer 1

0

SharePoint JSON formatting does not support showing "Office Location" property from Azure AD for person or group column.

The people field object supports the following properties only in JSON formatting (with example values):

{
  "id": "122",
  "title": "Kalya Tucker",
  "email": "[email protected]",
  "sip": "[email protected]",
  "picture": "https://contoso.sharepoint.com/kaylat_contoso_com_MThumb.jpg?t=63576928822",
  "department":"Human Resources",
  "jobTitle":"HR Manager"
}

Documentation: SharePoint JSON formatting - Special string values

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.