cancel
Showing results for 
Search instead for 
Did you mean: 

CSFR Token with OData Receiver on SAP PI

davidschievers
Participant
0 Kudos

Hi all,

we are facing the following problem:

We want to send a message to our S4 system by using the OData receiver adapter to perform a POST call.

But we are getting the following error: CSRF token validation failed</Message></Result><Result><StatusCode>403</StatusCode><StatusText>FORBIDDEN<

Is there a way how to set up the OData receiver to get the CSRF token?

Regards

David

0 Kudos

Hello David,

Could you share how you solved this issue?

Karla.

Accepted Solutions (0)

Answers (3)

Answers (3)

davidschievers
Participant
0 Kudos

Hi Karla,

we opend a ticket at SAP and updated the OData Adapter on the SAP PI/ PO system.

Regards

David

manasiev
Advisor
Advisor
0 Kudos

Hi David,

Manoj is right - OData adapter handles CSRF token internally. May I know the SP and patch levels of PIADAPTERS and PICOASUF SCAs deployed on your system?

Thanks,
Ivo

davidschievers
Participant
0 Kudos

Hi Ivo,

we are on SP 20.

PIADAPTERS: 1000.1.0.3.35.20200124105300

PICOASUF: 1000.1.0.3.27.20200110003700

Regards

David

manasiev
Advisor
Advisor

Hi David,
Thank you! Please report an incident in BC-XI-CON-ODT so that we can investigate the issue.

Best regards
Ivo

manoj_khavatkopp
Active Contributor
0 Kudos

Hi David,

As far as i know,there is no explicit option to handle CSRF token in ODATA adapter, I believe it does that x-csrf token internally.

In case if you still need you can use the REST adapter which has this feature.

Thank,

Manoj

davidschievers
Participant
0 Kudos

Hi,

unfortunately the OData adapter seems not to handle the CFSR token request right since we are getting always the error:

CSRF token validation failed</Message></Result><Result><StatusCode>403</StatusCode><StatusText>FORBIDDEN<

When we try to use the REST adapter we are facing the problem that we are getting the error “Bad Request” because the format in which the REST adapter sends the message is different to the OData adapter.

Regards

David