question

FabioRodrigues-0157 avatar image
0 Votes"
FabioRodrigues-0157 asked CurtisWeber-3552 commented

b2c API connectors timeout after 30 seconds, retries but UI gets stuck

The documentation says that b2c API connectors on custom policies have the following behavior related to timeout/retries

If there is slow or no response from the RESTful service to Azure AD B2C, the timeout is 30 seconds and the retry count is two times (meaning there are 3 tries in total). The timeout and retry count settings are not currently configurable.

https://docs.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview?pivots=b2c-custom-policy

I can see the retry after 30 seconds hitting the backend, but in the UI it gets stuck on the message

Please wait while we process your information.

And in the browser I can see that the request failed in 30 seconds, with '503 Service Unavailable'.

Isn't supposed to wait more 30 seconds for the first retry?
Also, why the UI is getting stuck instead of showing error?

Thanks

azure-ad-b2c
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @FabioRodrigues-0157 , we are investigating your issue and will update you shortly.

Best,
James

1 Vote 1 ·

1 Answer

JamesHamil-MSFT avatar image
0 Votes"
JamesHamil-MSFT answered CurtisWeber-3552 commented

Hi @FabioRodrigues-0157 , we've looked into this and understand that the documentation was a little confusing. We will be sure to fix the docs soon to account for this.
When you call an API Connector, there are many responses that could result form the call:

1- No response at all, in such case the timeout is 30 seconds and there are no retries for that.
2- Bad response, in such case the call is retried two more times. Has nothing to do with the 30 seconds timeout.

In both cases, you should get back an error message that looks something like this:

115485-screenshot.jpg



I hope this helps! Please let me know if you have any questions.

If this answer helped you please mark it as "Verified" so other users can reference it.

Thank you,
James


screenshot.jpg (615.4 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @JamesHamil-MSFT ,

I am working on a solution for a client that is seeing a retry to a rest API after 30 seconds when no response from the API. Your response here indicates that shouldn't be the case. Is there any update to the documentation or to your response? Additionally, have there been any updates to allow an increase to the timeout?

Thanks a lot!
Curtis

0 Votes 0 ·

For some more context, it seems that the API technical profile returns this:

{ "Key": "Exception",
"Value": {
"Kind": "Handled",
"HResult": "80131500",
"Message": "ErrorCodes: AADB2C90075",
"Data": {
"IsPolicySpecificError": false
}
}
}

And then the next action is this:

{
"Kind": "Action",
"Content": "Web.TPEngine.StateMachineHandlers.SendRetryHandler"
}

I havent been able to find much information regarding the error code or the SendRetryHandler, but it seems perhaps the API did return an exception and then send a retry?

Any guidance or help you can provide would be great, thanks again!
Curtis

0 Votes 0 ·