How to change default rest request timeout and retry

Matt 20 Reputation points
2025-05-01T19:45:34.2033333+00:00

I have a RESTful technical profile making an API call to an external service that takes between 7-15 seconds to return a response and I'm getting ResponseCode 0 with the error message "Client connection was unexpectedly closed." for requests that take longer than 10 seconds and then a retry is triggered.

I found this in the Azure documentation:

"HTTP requests may be cancelled if there is a slow or no response from the RESTful service to Azure AD B2C. The default timeout is 10 seconds and the default retry count is one (meaning there are 2 tries in total)."

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

It mentions a default timeout of 10 seconds and default retry count of one but I can't find how to change the defaults. Is this possible?

Microsoft Security Microsoft Entra Other
{count} votes

Accepted answer
  1. Kancharla Saiteja 5,485 Reputation points Microsoft External Staff Moderator
    2025-05-05T12:23:20.4033333+00:00

    Hi @Matt,

    Based on your query, here is my understanding: you would like to know if there is any change possible for default time out of REST API requests.

    This is the latest update available regarding REST API. Previously we used to have a time out frame of 30 seconds which has been changed to 10 seconds now. If you would like to go back to 30 seconds timeout frame, you can revert only for production environment only and this is not possible for non-production environment.

    Note: This extension is only until the end of this year i.e. 12/31/2025.

    In case if you would like to revert back to 30 seconds, please check the steps in the private message for further proceedings on the same.

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    If the answer is helpful, please click "Accept Answer" and kindly "upvote it". If you have extra questions about this answer, please click "Comment"


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.