"Insufficient Permissions. Please Check Oauth Token and scope permission" error in flow designer.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 12:12 AM
Hello All,
We are getting error in Flow Designer.
Error: "Insufficient Permissions. Please Check Oauth Token and scope permission".
It's happening rarely, let us know how to fix this?
Please explain on what circumstances this type of error occurs?
We are calling script include inside the Flow Designer subflow.
Script Include:
if (inputObj.status == 401) {
respObj.errorMessage = gs.getMessage("Unauthorized");
if (responseBody.error && responseBody.error.code == "InvalidAuthenticationToken") {
respObj.errorMessage = gs.getMessage("Insufficient Permissions. Please Check Oauth Token and scope permission.");
}
}
Flow Designer Script:
(function execute(inputs, outputs) {
// code
var responseBody = new global.JSON().decode(inputs['response']);
if(inputs.status == '201') {
outputs.userId = responseBody.id;
} else {
var errorObj = new AzureADErrorHandler().userErrorHandler(inputs,outputs);
throw new Error(errorObj.errorMessage);
}
})(inputs, outputs);
Please help me on this.
Thanks,
Sattar
1 REPLY 1
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 12:34 AM