I am using Auth0 Delegated Administration Extension to manage users. When I am trying to create user, I am getting this error.
Oh snap! You got an error!
An error occurred while creating the user: {"statusCode":400,"error":"Bad Request","message":"Payload validation error: 'Additional properties not allowed: memberships (consider storing them in app_metadata or user_metadata. See \"Users Metadata\" in https://auth0.com/docs/api/v2/changes for more details)'.","errorCode":"invalid_body"}
How could I solve this and create users?
In your create hook, try the following:
return cb(null, {
...
app_metadata: {
memberships: memberships
}
});
You have to construct the object that is sent to the API. Some people want to store it in app_metadata.groups
others in app_metadata.departments
...