Gurujyot Singh

Gurujyot Singh

  • 2k
  • 7
  • 363

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:
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:
This script does not gives me the error but it also does not update or do anything.
any help would be much appreacited 

Brought to you by:

Answers (1)