Powershell script RestAPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 07:35 AM
Hi ,
Using powershell scripts I need to insert data into INCIDENT table using REST API .
Please let me know how to achieve this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 08:43 AM
I believe I am having write access to the table as I am able to POST (add) the entry in incident table but only problem with updating the record .
Write access is needed to make changes (updates); create access is needed to add a new record (inserts) - so it's more likely you have create but not write.
However, your screen dump indicates this user has the itil role, which should permit inserts and updates. Have you tried impersonating that user and seeing what you're able to add/change first?
Also: it's not a good idea to give them the itil role, since this is licenced and consumes a seat - it may be better to create a separate role with specific insert/update rights.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 08:48 AM
Yes , I am able make updates after impersonating the user (rest user) from UI but I am getting the issue while running the powershell script to update the record .
The remote sever returned an error : (403) Forbidden .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 08:50 AM
The remote sever returned an error : (403) Forbidden .
That would suggest the error lies with your PowerShell script. Have you tried checking the URL it's constructing, testing that works in a browser? Is the script writing any log lines out at all?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2017 08:52 AM
It is construction the correct URL why because as soon as I granted admin role to the user the record getting updated .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 07:20 AM