Terraform Provider Registration Issue - Azure

I am facing this error ╷

92│ Error: Unable to list provider registration status, it is possible that this is due to invalid credentials or the service principal does not have permission to use the Resource Manager API, Azure error: resources.ProvidersClient#List: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: error response cannot be parsed: {“\r\nBad Request\r\n<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">\r\n

Bad Request - Invalid URL

\r\n

HTTP Error 400. The request URL is invalid.

\r\n\r\n” ‘\x00’ ‘\x00’} error: invalid character ‘<’ looking for beginning of value

93

94│ with provider[“Terraform Registry”],

95│ on provider.tf line 9, in provider “azurerm”:

96│ 9: provider “azurerm” {

Service Principal is correct and also has contributor access and it’s working fine from local but while i am trying to run via Gitlab pipeline it’s failing also gitlab pipeline works fine till yesterday i am started to get this issue today please help

1 Like

Any updates on this issue?

My suspicion is that this could have to do with the sunsetting of Azure Classic Administrator roles. I have seen several issues in Azure recently with Service Principals, particularly from pipelines, since the end of August 2024 that we couldn’t figure out because permissions existed, but they had to be updated to new Azure roles as the old ones were sunsetted. Maybe try creating a new Service Connection?

I suspect this is the case but haven’t found the fix. Let me know if anyone else has seen this, as well.