User is unauthorized to write to table: Incident, when trying to upload an attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2021 01:40 PM
Hi,
I'm trying to use SNOW's Rest API to upload attachments to Incidents.
curl --location --request POST 'https://[...].service-now.com/now/attachment/file?table_name=incident&table_sys_id=[...]&file_name=[...]' \
--header 'Accept: application/json' \
--header 'Authorization: Basic [...]' \
--header 'Content-Type: [...]' \
--data-binary '[...]'
When I use a user with an admin role, the attachment is uploaded successfully.
When I use a none admin user, I'm getting the next error:
403 Forbidden - User not authorized. User is unauthorized to write to table: Incident
The same none admin user can successfully create and update Incidents using the Rest API. It only fails when trying to upload an attachment.
This user can upload attachments with no issues when using SNOW application in the browser.
I've tried adding to this user a few relevant Roles like:
incident_manager, itil, rest_service, & sn_incident_write.
I've tried creating a new Role and then a few new ACLs that require this role.
ACL with create & write operations on the Incident and sys_attachment table.
I've assigned the new roles to this user but it didn't help.
Also tried to add the roles to:
System Properties -> Security -> List of roles (comma-separated) that can create attachments.
Nothing is helping.
Any idea?
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2021 02:46 PM
Hi ,
Check out this community post.
https://community.servicenow.com/community?id=community_question&sys_id=85b1db6ddbdcdbc01dcaf3231f961912
Thanks,
Nitin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2021 04:24 PM
Hi
Unfortunately, I don't see any solution in the post above.
I've tried adding this user the mentioned roles: itil, rest_service and a few more.
Also, the credentials are correct since I can successfully perform other API calls with this user.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2021 01:09 PM
Can you please share details of the ACLs?
I think you will need table level acl , the one without * in both tables - incident and sys_attachment.
Thanks,
Nitin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2021 01:42 PM