google apps script - Trying to remove information from a user profile -


i'm trying clean information out of user profiles in google apps via admin sdk. in below example want remove websites listed in profile. during execution looks , result of patch function shows profile without websites in it. (update function has similar results)

however when looking @ profile afterwards websites still there ?

what doing wrong ?

function cleanuserprofiletst() {   var useremail = 'john.doe@mydomain.com'   var user = admindirectory.users.get(useremail);   logger.log (user);   var websites = user.websites;   delete user.websites;   logger.log (user);   var result = admindirectory.users.patch(user, useremail);   //var result = admindirectory.users.update(user, useremail);   logger.log(user);   return result; } 

try user.websites = "" instead of leaving out of resource goes via patch / update


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -