How do I give a user permissions to access sys_dictionary.list for the incidents table?

lexicalunit
Giga Expert
  • I have created a role called `data_exchange`.
  • I have elevated my permissions so that I can create ACLs.
  • I have created a new ACL for reading `sys_dictionary.*` and added my role to it.
  • I have given that role to the Abel Tuter user.

Now I'm trying to use the REST Table API to query the table. I have OAuth all set up for that. However when I make my request, I get back this error:

{
  "error": {
    "message": "User Not Authorized",
    "detail": "User is unauthorized to access table: sys_dictionary"
  },
  "status": "failure"
}

Here is what my ACL looks like:

Screenshot 2025-01-21 at 11.11.04 AM.png

Here is what my user looks like:

Screenshot 2025-01-21 at 11.12.29 AM.png

Do I need to add more ACL to the role so that the user can make this query?

Here is my query, for reference:

# specifics and secrets are omitted from this post, but assume I have the following defined:
CLIENT_ID="OMIT"
CLIENT_SECRET="OMIT"
INSTANCE="OMIT.service-now.com"

# to get the access token:
curl \
    --url "https://$INSTANCE/oauth_token.do" \
    --header "content-type: application/x-www-form-urlencoded" \
    --data grant_type=client_credentials \
    --data client_id="$CLIENT_ID" \
    --data client_secret="$CLIENT_SECRET"

# then, assign it to a variable:
ACCESS_TOKEN="OMIT"

# finally, I'm ready to make the request:
ENDPOINT="/api/now/table/sys_dictionary"
sysparm_query="name%3Dincident"
QARGS="sysparm_query=$sysparm_query"
curl -XGET "https://${INSTANCE}${ENDPOINT}?${QARGS}" \
    -H "Authorization: Bearer $ACCESS_TOKEN" \
    -H "Accept: application/json"
1 ACCEPTED SOLUTION

lexicalunit
Giga Expert

I needed to give ACL for `sys_dictionary` *AND* to `sys_dictionary.*` to get it to work.

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@lexicalunit 

why to use this?

What's your business requirement here to give access to Dictionary table other than admin?

I won't recommend as this is system table

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

I need to fetch the fields of an incident and this is the only place that SN exposes it. If it's not recommended, then that's an implication for the general use of SN more than anything.

lexicalunit
Giga Expert

I needed to give ACL for `sys_dictionary` *AND* to `sys_dictionary.*` to get it to work.