Gurujyot Singh

Gurujyot Singh

  • 1.9k
  • 7
  • 146

Unable to add or update the SPS-Location in SPO user profile

Aug 21 2019 10:26 AM
Hello all,
 
I need urgent help in updating/adding the usagelocation of office 365 user into the office Location (sps-location) under user profile of Sharepoint Online.
 
I have been trying the script mentioned here:https://github.com/SharePoint/PnP/blob/master/Samples/UserProfile.BatchUpdate.API/CreateImportJob.ps1
 
But I get below error: 
Exception calling "ExecuteQuery" with "0" argument(s): "URL is not for this web"
At C:\Users\gsjolly\Documents\pnpapi.ps1:65 char:1
+ $context.ExecuteQuery();
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ServerException
Import job created with following identifier: 00000000-0000-0000-0000-000000000000
 
In above command, I have saved the sample JSON file in my sharepoint site as sample.txt. I also tried with sample.json, but still I get the same error. 
 
 
 
I have also tried the script mentioned in: 
https://www.c-sharpcorner.com/article/update-user-profile-properties-from-sharepoint-using-csom-po/
This script does not gives me the error but it also does not update or do anything.
 
 
any help would be much appreacited 
 
 

Answers (1)