Once an API request is called at that time oauth2 token is expired and the oauth2 token is renewed but does not continue that specific API request. only the second API call seems to work.
In my application, there are two authentications. one is azure ad authentication which is for user authentication and another one is for API gateway authentication that is oauth2 authentication. once the oauth2 token is expired on any API call. after renewing the token that same will not process. Already that API request is gone and returns an error. cannot able to handle the request while the oauth2 token is renewed. the particular request is not waiting for to oauth2 token to renew.