Integration with sap to servicenow token authentication fail

Mahesh6
Kilo Contributor

We are working on token-based integration with SAP.

SAP Team has provided the rest API for the token type is “x-csrf-token” it has generated.

We are sending the csrf token in PUT rest API but it is returning as a response is “CSRF token validation failed”.

HTTP Status : 403

Error message : Method failed: (/sap/opu/odata/SAP/ZPTG_USER_UNLOCK_SRV/UserDetailsSet(Bname='KOTI6')) with code: 403 - Forbidden username/password combo

The same web services is working in postman but not in servicneow.

Please let me know if anyone did integration with ServiceNow to SAP

 

 

7 REPLIES 7

Harsh Vardhan
Giga Patron

adding one hi article here, it has mentioned one properties. 

glide.security.use_csrf_token

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0565021

I have tried above property glide.security.use_csrf_token getting same error.

The article KB0565021 for calling in the service portal.

I need to call in rest message

Nikhil Bahurup1
Tera Expert

Hi Mahesh,

Please verify if you are sending the correct Payload from servicenow. You can log the the payload and compare it with payload which was successful in postman.

Adam Stout
ServiceNow Employee
ServiceNow Employee

If you don't find what you are looking for, you may want to post this in a different Community as this is mostly reporting and analytics experts, not integrations experts.