Change language in delve using CSOM or REST api Sharepoint online?
-
10-10-2020 - |
Question
Delve has user profile property of languages. I have a requirement that on a click of a button I have to update this field in user profile. It's in SharePoint online.
I have googled it and found how to read properties and have successfully done that but not sure how to update it or delete the existing settings.
Any help is appreciated.
Solution
I got a very good article on this and would like to share the same with you.
The link shows how to update a user profile property
I got an error somewhere in the code at the line
<Values>' + values + '</Values>'
which needs to be replaced by
"<Values><ValueData><Value xsi:type=\"xsd:string\">" + propertyValue + "</Value></ValueData></Values>" +
Source for this is : SPServices Stories #20 – Modify User Profile Properties on SharePoint Online 2013 using SPServices
You may find below also helpful for this: SharePoint user profile properties now writable with CSOM
This solution actually worked for OOTB as well as custom properties.