web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Permissions error on power Automate for originator of document

(0) ShareShare
ReportReport
Posted on by 1,161

Hi All,

I have set up power automate (flow) and the approval email is sent for approver and approver can successfully accept.  However it fails on the condition after where the document should be added and the originator gets and email

Error:

User ACCOUNTS does not have the permission necessary to continue the item
In BC 17.2 SaaS I have setup user under approval users and allocate license and use is essential licensed user and as some previous posts on the topic mentioned there is no "Super" permission set available.
FLow-error.jpg
I have the same question (0)
  • JAngle Profile Picture
    121 on at
    RE: Permissions error on power Automate for originator of document

    What is the "Execute Action" in this scenario? What permissions does the essential license user have?

  • Suggested answer
    JAngle Profile Picture
    121 on at
    RE: Permissions error on power Automate for originator of document

    I hadn't been using PA to do approvals but recently got the same error and figured out what was wrong. It is a fairly silly solution but it for sure works. The user you have defined on the BC connector needs to be in the approval user setup page of BC either as an approver to any user or as a substitute to any user. If all that is true then it works like a charm.

    It's all down to this procedure that is called from the workflow webhook management codeunit. Part at the bottom is where the work around comes into play.

       local procedure CanAct(WorkflowWebhookEntry: Record "Workflow Webhook Entry"): Boolean

       var

           UserSetup: Record "User Setup";

           WorkflowStepArgument: Record "Workflow Step Argument";

       begin

           if WorkflowWebhookEntry.Response <> WorkflowWebhookEntry.Response::Pending then

               exit(false);

           if IsNullGuid(WorkflowWebhookEntry."Response Argument") then

               exit(false);

           if not WorkflowStepArgument.Get(WorkflowWebhookEntry."Response Argument") then

               exit(false);

           case WorkflowStepArgument."Response Type" of

               WorkflowStepArgument."Response Type"::"User ID":

                   begin

                       if WorkflowStepArgument."Response User ID" <> UserId then

                           exit(false);

                       UserSetup.Init();

                       UserSetup.FilterGroup(-1);

                       UserSetup.SetFilter("Approver ID", '%1', UserId);

                       UserSetup.SetFilter(Substitute, '%1', UserId);

                       exit(UserSetup.FindFirst)

                   end

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,255

#2
Sumit Singh Profile Picture

Sumit Singh 2,665

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,401

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans