Hi There,
I am trying to create rule via the management API. I am getting the error {“statusCode”:400,“error”:“Bad Request”,“message”:“Payload validation error: ‘Additional properties not allowed: id’.”,“errorCode”:“invalid_body”}`
here is the code which m using
const ruleScript = “function (user, context, callback) {\n callback(null, user, context);\n}”;
const ruleName = Auth Server Update
;
const rules: Rule = [{ name: ruleName, enabled: true, id: ‘newrule’, order: 1, script: ruleScript, stage: ‘login_success’ }];
management.createRule(rules[0], (err: Error, rule) => {
console.log(err, rule);
});
Any help would be really appreciated.
Thanks