REST API Service with External Authentication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 06:13 AM
We have a ServiceNow instance that is integrated with ActiveDirectory (AD) and no internal users.
Whenever the REST API is triggered, authentication error is thrown.
Is there any restriction of using REST APIs with external authentication?
ServiceNow instance is Geneva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2017 06:22 AM
Hi Thirumoorthy,
You need to create an api user in servicenow instance locally and use this username and password to consume the rest api.
Even for basic authentication and OAuth both require username and password for api consuming.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2017 11:18 PM
Hi Ankur,
Is it possible to use active directory username/password for using REST services? Creating users locally is prohibited in our organization.
Thanks,
Kalyan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2017 03:25 AM
Hi Kalyan,
That should be fine. But that user should be active and not locked out when anyone is trying to consume your API endpoint. If it is active false or locked out I think the API will throw authentication error. Not tried on this but you can check.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 03:22 AM
Yes Ankur. The user is active and unlocked.
Below behavior is observed when trying to connect to the instance through CURL.
URL: https://<domain>.service-now.com
Response: 302 Found
URL : https://<domain>.service-now.com/api/now/table/incident/<sysId>
Response: 401 Unauthorized
Are REST APIs compatible with external user Login?
Thanks,
Kalyan