Flow error in UAT instance - Scope does not have write access to table sys_user

CV1
Tera Contributor

Hi Everyone,

Need help with the following:

We have flow that POST data from SN to an application , and the application will return an employeeid that will be stored in SN sys_user table field u_abc.

 

The flow works good on DEV instance where it sends the data to the 3party application and returns the employeeid and updates that in sys_user table.

 

But while testing the same flow in UAT I am getting error -  Scope does not have write access to table sys_user.

checked for :

Application scope, REST Message and credentials and alias and all are the same in DEV and UAT

 

When I check executions in UAT i see it is posting the data to the application and the application is returning the employee_id . But the flow is failing when its trying to update the record to sys_user table.

 

Please advise how this can be rectified.

TIA

2 REPLIES 2

Daniel Biesiada
Mega Guru

Follow these steps to grant write access to the sys_user table:

  1. Navigate to "System Applications" > "Applications" in ServiceNow.

  2. Find the application scope you are using for your flow. Click on the application name to view the details.

  3. Click on the "Application Access" tab.

  4. Click the "New" button to create a new access control for the application.

  5. In the "Type" field, select "Table."

  6. In the "Operation" field, select "Write."

  7. In the "Name" field, select or enter "sys_user."

  8. Ensure the "Grant Access" checkbox is selected.

  9. Click "Submit" to save the new access control.

  10. Test your flow in the UAT instance to see if the issue is resolved.

If the issue persists, ensure that your REST message or flow is running under the correct user context with the necessary roles to update the sys_user table. The user context can be checked in the flow properties or the REST message settings.

Additionally, review any business rules or other configurations that might be preventing the update operation on the sys_user table in the UAT instance.

Ratnakar7
Mega Sage
Mega Sage

Hi @CV1 ,

 

It seems like the user account used by the flow in UAT instance does not have write access to the sys_user table. Here are some steps you can take to troubleshoot and resolve the issue:

  1. Check the user account: Make sure that the user account being used by the flow has the necessary permissions to write to the sys_user table in the UAT instance. You can check this by going to User Administration > Users and opening the user account used by the flow. Verify that the user has the appropriate roles and access to write to the sys_user table.

  2. Check the scope: Make sure that the application scope of the flow has write access to the sys_user table in the UAT instance. You can check this by going to System Definition > Tables and opening the sys_user table. Verify that the application scope of the flow has write access to the table.

  3. Check the REST message: Make sure that the REST message being used by the flow has the correct credentials and alias for the UAT instance. You can check this by going to System Web Services > REST > REST Messages and opening the REST message used by the flow. Verify that the credentials and alias are correct for the UAT instance.

  4. Check the flow designer: Double-check the flow designer to ensure that the flow is correctly configured to write to the sys_user table in the UAT instance. You can also try testing the flow using a different user account or table to see if the issue is specific to the sys_user table or user account being used.

  5. Check the system logs: Review the system logs in UAT to see if there are any error messages or clues that can help identify the root cause of the issue. You can access the system logs by going to System Logs > System Log > All. Look for any error messages related to the flow or the sys_user table.

 

If my response was helpful in resolving the issue, please consider accepting it as a solution by clicking on the Accept solution button and giving it a thumbs up 👍. This will benefit others who may have a similar question in the future.

 

Thank you!

Ratnakar