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 -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -