Can a user with ITIL roles or Fulfiller users execute a UI Action which calls a flow action

Anubhav24
Mega Sage
Mega Sage

Hi All,

 

I have a user with ITIL roles , my setup is I have a Flow Action which is getting triggered from a UI Action and this UI Action is presented to the itil/fulfiller user on RITM form. Now when I execute this UI Action as an admin it works fine but for itil users / fulfiller users in my case , it looks like that it does not have access to the sn_fd.FlowAPI and it fails to execute the Flow action getting triggered from the UI Action. I get the error of : "Method failed with code 403 : Forbidden username/password combo" is it the right error or the third party system is not behaving properly?

 

Is there a workaround for this scenario?

 

I can not write this action inside a flow as this flow action needs to be called repeatedly for the same record and it is making a call to a third party system to send some data. If I write this flow action inside a flow there will be multiple instances of this flow getting triggered or  may face the error of flow already executing for this record.

 

Can I use some API to set the user as system user and write this inside my UI Action before the flow action is called ? I saw it somewhere but I am not sure about the function call. Also will it be a good practice ?

 

And if we need to assign roles , what are the specific roles to make it work for fulfiller/itil users?

 

Thanks in advance.

 

11 REPLIES 11

@Anubhav24 

I already informed above that flow action doesn't have run as configuration

You can do this

1) Create a subflow and configure it to Run as System User

2) then include your flow action in that Subflow

3) then call that subflow from your UI action instead of calling flow action

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Anubhav24 

in your flow are you trying to get some credentials etc for invoking 3rd party API and possibly your flow/subflow when running with that user is not having access to credentials etc record.

The flow/subflow/action which you are triggering from UI action ensure it's configured as Run as -> System User

This should work for you

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader