REST API sc_item_option_mtom ACL Restrictions

lipetravis
Giga Contributor

I am trying to retrieve a request item's variables using the following query:

https://{servicenowinstanceurl}.service-now.com/api/now/table/sc_item_option_mtom?sysparm_query=request_item={requestItemSystemID}

When I make a GET request to the above URL, I get the following error as a response:

{

  "error": {

      "detail": "7 records constrained due to ACL restrictions",

      "message": "User Not Authorized"

  },

  "status": "failure"

}

I'm assuming this is a permissions error for my REST api user. What role should the user be granted in order to have access to these records?

Thanks,

Travis

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Travis,



Is rest_service role assigned to the user account used here?


Yes, it is. Here are all of the roles assigned to the rest api user:



api_analytics_read


certification


itil


pa_viewer


rest_api_explorer


rest_service


snc_internal


view_changer


JennyHu
Tera Guru
Tera Guru

Hi Travis,



As a test, can you temporarily uncheck the "Web service access only" role for that rest api user, and impersonate that user to see if that user has access to see the records in question.



In the application filter, enter sc_item_option_mtom.list and build the query that filters on requestItemSystemID



If you get the same ACL error, then I would take a look at the ACL for the sc_item_option_mtom table.  



Thanks,


Jenny


Per your suggestion, I logged in as the rest api user and tried to access the sc_item_option_mtom.list but I get a "Security constraints prevent access to requested page." error. So I believe this is being caused by ACL settings on that table.



We wanted to avoid making changes to the ACL, so we figured out a different way of programming the application to avoid having to make the api call to the sc_item_option_mtom table.



Thank you for your help.