Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-10-30 07:11 AM
Hi ,
I am Getting permission denied error when trying to use put method on REST API to update record. Any tips on this
2018-10-30 07:29 AM
Make sure the API user you are using to update the record has update access to the application via a role. And if the application in question has record permission fields the API user needs to be listed in a record permission field that has update access.
Advisory Consultant
2018-10-30 07:56 AM
Double checked that, yes he/she has all the permissions to update and create record .
A part of the code I used is this
2018-10-30 08:02 AM
Thanks, you'll need to pass the CSRF token in the ajax call. Add the following to attribute in your $.ajax
headers: {
'x-csrf-token': (window.sessionStorage) ? window.sessionStorage.getItem("x-csrf-token") : parent.parent.ArcherApp.globals['xCsrfToken']
},
Advisory Consultant
2018-10-30 08:02 AM
Make sure the account that you have in the REST call has the appropriate rights for the operation you are try to perform.
Easy way to test this is to bump the account to sysadmin for a try or two. If it works, you need to refine your permissions on the original account.
Sent with BlackBerry Work (www.blackberry.com)
2018-10-30 08:11 AM
Hi David,
I tried the same but still permission is being denied
2018-10-30 08:12 AM
Hi Andy,
I have tried the same in sysadmin and still the same occurs . No luck on that
2018-10-30 08:16 AM
Have you verified your URL?
Sent with BlackBerry Work (www.blackberry.com)
2018-10-30 08:22 AM
Can you provide the exact error you're getting back?
Also make sure that the /api folder isn't protected by SSO and that in IIS the folder security is set as anonymous.
Advisory Consultant
2018-10-30 08:23 AM
Yes Andy , URL is fine.