Delegated Admin Extension: custom property not writing to app_metadata

Well found the solution eventually, it had to be included in a Write Hook, something like this:

function(ctx, callback) {
  var newProfile = {
    email: ctx.payload.email,
    password: ctx.payload.password,
    connection: ctx.payload.connection,
    app_metadata: {
      city: ctx.payload.city
    }
  };
  
  return callback(null, newProfile);
}

I also changed the property name to “city” in the Settings Query instead of the previous “app_metadata.city”.

1 Like