cancel
Showing results for 
Search instead for 
Did you mean: 

Sporadic 401 Unauthorized Response - Working Fine 97% Of The Time

CallMeUp
Not applicable

Hey there, I'm struggling to chase down the root cause of an issue here that just popped up a couple weeks ago and is causing everybody a headache. 

We have Workato in between an ECM tool and an ERP tool. 97% of the time the calls are returned properly, 200 is logged, and everything looks good.

A little under 3% of the time though we're getting 401 Unauthorized back. This is logged in Workato in the logs under API Management. Every 401 Unauthorized log is reporting 0ms total response time, and the client column is empty. 

I checked in the ERP logs, and I don't see any requests with the timestamps of the 401 Unauthorized returns, only the successful 200 responses are in there. I checked in Entra to see if there was any issue in there, but I only see the account being logged into ever 24 hours by Workato which is showing successful. 

I'm not sure where the issue is - so I figured I'd post here to see if anybody had any ideas on where to look.

12 REPLIES 12

Exactly, that is what I meant. Check your token validity and refresh timing, there might be a small gap causing those random 401.

Hi @Bhagya_pola - thank you for you input so far. Can you clarify where I would check this timing? I took a look through the connections and API settings, but I didn't see anything that seemed to line up with your description. 

To add some context, which I gave to @rajeshjanapati as well, the specific apps being connected here are Epicor ECM and Dynamics BC. 

Access tokens are valid for 3600 seconds (1 hour).  After that, the token expires and cannot be used anymore. 

Have you implemented Error handling concept to retry the failed records when it is 401 error ??

I did try that, however it didn't seem to make any difference. 

Is there a way I can confirm where the 401 is coming from conclusively? We assume the BC/Entra side, but we can't find anything in their logs to correspond to it, so we're curious if it's perhaps something within Workato that's being interpreted as a denial.