Need to setup Authentication for Scripted REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
I am new to integration, I have created a scripted REST API(GET) to send some CMDB field details in JSON format, It is working fine when tested using REST API Explorer, Now the next we need to setup authentication. Client have provided service account user (username and password) which has cmdb_read role.
Please guide me how can I setup this authentication in scripted REST API. Do i need to created ACL of type REST_End type and provide the role as cmdb_read and use this ACL in scripted Rest API. Also How can i test this using Postman?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @Ankur Bawiskar , Hi Ankur, Client is asking to use LDAP user credential for authentication instead for local user. Is there anything alternative we can suggest to client. How they will be testing this in production?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I believe I answered your original question.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
you need a local user account for integrations and not LDAP user.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sunilmaddhe,
here are some resources I found which might help you set up authentication:
How to perform Mutual authentication for Scripted REST APIs (ServiceNow Community) — https://www.servicenow.com/community/sysadmin-forum/how-to-perform-mutual-authentication-for-scripte... ServiceNow
OAuth for Scripted REST API (ServiceNow Community) — https://www.servicenow.com/community/developer-forum/oauth-for-scripted-rest-api/m-p/2919246 ServiceNow
YouTube: Scripted REST APIs — https://www.youtube.com/watch?v=xS-8Y6o9hUk
LinkedIn article: Day-3 Scripted REST API (OAuth Setup) by Nikhil Gupta — https://www.linkedin.com/pulse/day-3-scripted-rest-api-oauth-setup-nikhil-gupta-8ybxf
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
