Dec 13 2018 01:49 PM
I hope someone knows the answer to this because no one I've talked to at Microsoft does.
I have created custom properties for my user profiles, such as Employee Id. I want to update these properties on a nightly schedule using PowerShell. I have followed the instructions on this page in order to accomplish this task:
When I run the script, I seem to get a successful run, ie: No error messages
However, the Guid returned is a null value, in other words 00000000-0000-0000-0000-000000000000
Also when I run this command $o365.GetImportProfilePropertyJobs(), I get an error stating that the collection has not been initialized. Meaning there have been no jobs created.
So it looks like this command is not working for me, am I missing something???
Dec 13 2018 02:38 PM
Dec 14 2018 08:38 PM
I've been able to do this successfully, and I can tell you to be sure you are a global admin running the PowerShell, have access to the library where you are writing/storing the JSON files, and especially pay very close attention to the format of your JSON files. That gave us more grief more than anything. I would run the script in VSCode or the ISE and go line by line to ensure things are getting loaded and check to see where you might be going sideways.
Dec 17 2018 08:35 AM
SolutionBTW, I was able to accomplish this task by using the following PowerShell command. Thanks to Mikael Svenson.
New-PnPUPABulkImportJob -Folder "Shared Documents" -Path "userprofileimport.json" -IdP
roperty "IdName" -UserProfilePropertyMapping @{"EmpId"="EmpId"}
Mar 11 2020 07:55 PM
@John Warner able to share the script you used to schedule nightly updates? I'm trying to do something similar, to update say every alternate Monday at 12 AM
Dec 17 2018 08:35 AM
SolutionBTW, I was able to accomplish this task by using the following PowerShell command. Thanks to Mikael Svenson.
New-PnPUPABulkImportJob -Folder "Shared Documents" -Path "userprofileimport.json" -IdP
roperty "IdName" -UserProfilePropertyMapping @{"EmpId"="EmpId"}