Azure Directory B2C Custom Policy DevOps (504) Gateway Timeout

Khalid Usman 56 Reputation points
2022-05-13T10:04:12.273+00:00

Hi,

I have AD B2C custom ploicy release pipeline in Azure DevOps. Everythig was working fine but recentlty my pipeline is failing due to (504) Gateway Timeout.

The error I'm getting is below;

Invoke-RestMethod : The remote server returned an error: (504) Gateway Timeout.
At D:\a\1\s\custom-scripts\custom-policies-test-deployment-script.ps1:50 char:17

  • ... $response = Invoke-RestMethod -Uri $graphuri -Method Put -Body $polic ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
    eption
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,002 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,840 questions
{count} votes

13 additional answers

Sort by: Newest
  1. James Hamil 22,266 Reputation points Microsoft Employee
    2022-05-31T18:59:12.207+00:00

    This should be fixed now for everyone! If anyone is still experiencing the error please let me know.

    Best,
    James


  2. Khalid Usman 56 Reputation points
    2022-05-26T08:57:31.21+00:00

    Thanks @ JamesHamil-MSFT. It is working now.

    0 comments No comments

  3. Sylvain 1 Reputation point
    2022-05-20T14:23:55.307+00:00

    Hi folks,
    I have also this issue, and I have implemented a retry mechanism and thanks to that, I am able to successfully deploy the policies via Azure DevOps. I hope that Microsoft will fix it soon, as the management API seems not be reliable right now for Azure AD B2C.


  4. Nelum Weerakoon 11 Reputation points
    2022-05-20T02:32:24.203+00:00

    We are also facing the same. Do we have any updates on a solution?

    2 people found this answer helpful.
    0 comments No comments