Org Chart using SPO list and M365 profile pic

Hi, I recently installed Org Chart in our M365 tenant. Source data is coming from a list on the site; however, I would like profile pic to come from the user's profile in M365. The list contains a column with UPN for each employee. Is this possible?

Thanks!

Hi @MarcG,

You can create a calculated column in your list and use it as a Picture field in the template. Here's the formula you should use:

=IF(ISBLANK([ProfileUpn]);"";CONCATENATE("/{site relative url}/_layouts/15/userphoto.aspx?size=L&accountname=";[ProfileUpn]))

  • If your Org Chart is located on the site collection, replace {site relative url} with the relative URL (e.g. /sites/org-chart).
  • If your Org Chart is at the root of the site, remove {site relative url} so that the formula starts with /_layouts. This would make the formula:

=IF(ISBLANK([ProfileUpn]);"";CONCATENATE("/_layouts/15/userphoto.aspx?size=L&accountname=";[ProfileUpn]))

ProfileUpn should be replaced with the actual name of the column that contains the profiles' UPNs.

If you get a syntax error like "The formula contains a syntax error or is not supported," try replacing all the semicolons (;) with commas (,) in the formula.