Is it possible to use Object.defineProperty in Auth0 Rules?

I’m trying to create the following rule on Auth0:

function (user, context, callback) {
  // TODO: implement your rule
  var app = 'myAppName';
  var obj = {};
  Object.defineProperty(obj, app, { roles: 'admin, customer'});
  user.obj = obj;
  callback(null, user, context);

When I try the rule the user.obj property is equals {}

  "obj": {},
  "user_id": "auth0|0123456789",

Is there anything that I’m missing here?

As it has been more than a few months since this topic was opened, and there has been no reply or further information provided as to the existence of the issue, we are closing this topic. Please don’t hesitate to create a new topic if this issue is still present, we would be happy to work with you to help find a resolution.