We recently created a custom user profile property in SharePoint Online. We already sync some of the existing user profile properties using Powershell CSOM from Active Directory that don't sync by default (cellphone number) and want to sync additionally data stored in AD to the custom property.

The problem is I cannot set values for the custom property using PowerShell unless it is first populated in the GUI on SharePoint online. Using $spoPeopleManager.GetPropertiesFor, I cannot see the custom property for any users until I go to SharePoint Online and populate the value for the user. Once I do that, I can then see it via Powershell and it is able to be updated.

It appears to me that the custom property doesn't actually get created until it is first populated in SharePoint Online. Is there a way to do this for all users via a script of something in SharePoint online without going in and filling in the value for each individual user?

  • Follow up to this, I went back to SharePoint Online and edited the custom property to make it required and visible to Everyone. That allowed me to see the property and edit it via Powershell CSOM. – Clint Fisher Sep 20 '18 at 13:56
  • We experience similar issues. Requesting custom user profile properties does not yield any results via CSOM (or PnP equivalent). Making the property visible to Everyone unfortunately is no option for us. – Heinrich Ulbricht Oct 18 '18 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.