cancel
Showing results for 
Search instead for 
Did you mean: 

CSRF Token failed while running the odata service from UI

former_member189929
Participant
0 Kudos

Hi Experts,

I have been facing the following issue:

When i am executing the odata service from gateway client its working fine. but while running the same service from UI,  it's throwing an error as "CSRF token failed"

ISSUE: If i run the service in  chrome browser initially without mentioning the logon details in SICF, am able to getting the response. if i do the same by             mentioning the logon details in SICF for the same service it's saying an error as "CSRF Token failed".            

CASE 1:

NOTE: The above thing is happening if i mentioned user name and password details in SICF service as shown below.

input service:

service Response :

if i didn't mention the logon details it's working fine from UI (chrome browser ). as shown below.

below is the input odata service:

service response:

CASE 2:

NOTE: If i didn't mention the logon details it's working fine ,and  if i changed the logon details and run the service in the same browser by clearing the           cookies it's also working fine.

Is there any authentications required to run the service for new chrome user, Please guide on this.

If you help on this would be very helpful.

Thanks in advance,

Ravi varma.

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

Hi Ravi,

- Gateway client works because it internally handles CSRF automatically.

About CSRF failure when logon details are provided in ICF node

- When you provide logon details in the ICF node, you will not be getting CSRF token from the system. This is because CSRF will work only for services that require authentication. Check more here.

You can set a breakpoint in your javascript code and verify this.

regards

Krishna

former_member189929
Participant
0 Kudos

Thanks krishna. Issue got fixed.

kammaje_cis
Active Contributor
0 Kudos

Hi Ravi..What was the fix?

former_member189929
Participant
0 Kudos

Hi Krishna,

We just disable CSRF token and give user password at our service node in SICF transaction....

Now we are able to create supplier without any authentication though odata service.


Thanks

Ravi Varma

Sharadha1
Active Contributor
0 Kudos

Ravi,

How did you manage to disable the CSRF token?

-Sharadha

Sharadha1
Active Contributor
0 Kudos

Hi,

For anybody who has reached this thread looking for a solution, I have blogged the steps at

-Sharadha

Answers (0)