Forum Discussion

SPOguru9000's avatar
SPOguru9000
Copper Contributor
Sep 27, 2024

Issue with JSON Column Formatting for Certain User Profile Properties in SPO

Hi everyone,

We are experiencing an issue with JSON column formatting for certain user profile properties in SharePoint Online (SPO). While some properties are working fine, others are not displaying as expected despite being populated in both the Azure Portal and Delve.

**Working:**
- Employee Name
- Title
- Email Address

**Not Working:**
- Company Name
- Mobile Cell
- Work Phone

We have verified the information is correctly populated in both Azure AD and Delve.

Example of a Working JSON Formatting:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=[$UserProfile.jobTitle]"
}


Example of a Non-Working JSON Formatting:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "span",
"txtContent": "=[$UserProfile.workPhone]"
}


We have already reviewed the Managed Properties configurations in SharePoint Admin Center:
- /_layouts/15/searchadmin/ta_listmanagedproperties.aspx?level=tenant
- /_layouts/15/TenantProfileAdmin/MgrProperty.aspx


Additionally, we used PowerShell scripts to verify that the `WorkPhone` and `Mobile Cell` data exists in the SPO managed user profile:

powershell
$account = "email address removed for privacy reasons"

# Fetch user profile property
$userProfile = Get-PnPUserProfileProperty -Account $account

# Output sample properties
$userProfile


Sample Output:

CellPhone 444-777-1212
WorkPhone 555-888-1212


We understand that the properties are case-sensitive and have tried multiple variations to make this work, but without success.

Despite our efforts, the data for properties like Company Name, Mobile Cell, and Work Phone does not seem to pull through correctly using JSON formatting. Any assistance in resolving this issue would be greatly appreciated. If anyone has experienced similar issues or can provide insights on how to address this, it would be very helpful.

Thank you!

No RepliesBe the first to reply

Resources