createMembership set to true but not able to create custom membership

I have set createMembership to true in the membership hook of delegated admin dashboard, but I’m not able to enter any custom value for membership while creating user.

function(ctx, callback) {
  var currentGroups = ctx.payload.user.app_metadata.authorization.groups;
  return callback(null, {
   createMemberships: true,
   memberships: [ { label: currentGroups, value: currentGroups } ]