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?