Security error when trying to call a microflow from Javascript

I'm using Javascript Snippet module to use JS in my application. i'm trying to call a microflow in this way :{     params: {         actionname: "MyFirstModule.CalledMicroflowFromJS"     },     callback: function(obj) {         // no MxObject expected         alert("Just petted the cat a little");     },     error: function(error) {         alert(error.message);     } }); But when I try to run this, it shows this error : Executing action failed for security reasons: MyFirstModule.CalledMicroflowFromJS How can I fix this?
2 answers

You will either need to log in with the current user role in your app before running the javascript, or adjust the Allowed Roles on the microflow to match your current user.

The Allowed Roles on microflows are there to restrict which roles can trigger the microflows from the client specifically. If those don't match up, you get this error.


have you already tried this: go to checks an double click on the error