Skip to content

[BUG]: NewAz ApiManagementBackend 4.1.0 fails with "'url' should not be empty" on Azure PowerShell & PowerShell Version v5 build version 20348 #21152

@pratiksoni1408

Description

@pratiksoni1408

New issue checklist

Task name

PowerShell Task & Azure PowerShell Task

Task version

v5

Issue Description

Hello Team,

One of my customers is having issues with running Azure ApiManagementBackend version 4.1.0 on Azure PowerShell and PowerShell task inside Azure DevOps pipeline.

Error record:
2025-07-16T17:02:27.6371519Z ##[debug]New-AzApiManagementBackend :
2025-07-16T17:02:27.6382575Z ##[debug]Error Code: ValidationError
2025-07-16T17:02:27.6393445Z ##[debug]Error Message: One or more fields contain incorrect values:
2025-07-16T17:02:27.6404319Z ##[debug]Request Id: bc59b202-7c03-47f3-a75f-4b3d32e47ac2
2025-07-16T17:02:27.6415237Z ##[debug]Error Details:
2025-07-16T17:02:27.6425854Z ##[debug] [Code= ValidationError, Message= 'url' should not be empty., Target= url]
2025-07-16T17:02:27.6436926Z ##[debug] [Code= ValidationError, Message= 'protocol' should not be empty., Target= protocol]

The above URL is still passed in the script. However, still encounters the issue everytime running on the respective task from the pipeline.

Locally it works with the latest apimanagementbackend version 4.1.0 on Local PowerShell version v5 - build version 26100.

Breaks with latest apimanagementbackend version 4.1.0 on Azure PowerShell and PowerShell version v5 - build version 20348.

Workaround given: Using apimanagementbackend version 4.0.3 with Azure PowerShell and PowerShell tasks.

I kindly request the team to make the fixes as soon as possible.

Thank you,
Pratik Soni.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 11 Enterprise H2 2022

Relevant log output

2025-07-16T17:02:27.6371519Z ##[debug]New-AzApiManagementBackend : 
2025-07-16T17:02:27.6382575Z ##[debug]Error Code: ValidationError
2025-07-16T17:02:27.6393445Z ##[debug]Error Message: One or more fields contain incorrect values:
2025-07-16T17:02:27.6404319Z ##[debug]Request Id: bc59b202-7c03-47f3-a75f-4b3d32e47ac2
2025-07-16T17:02:27.6415237Z ##[debug]Error Details:
2025-07-16T17:02:27.6425854Z ##[debug]	[Code= ValidationError, Message= 'url' should not be empty., Target= url]
2025-07-16T17:02:27.6436926Z ##[debug]	[Code= ValidationError, Message= 'protocol' should not be empty., Target= protocol]

Full task logs with system.debug enabled

2025-07-16T17:02:27.6371519Z ##[debug]New-AzApiManagementBackend :
2025-07-16T17:02:27.6382575Z ##[debug]Error Code: ValidationError
2025-07-16T17:02:27.6393445Z ##[debug]Error Message: One or more fields contain incorrect values:
2025-07-16T17:02:27.6404319Z ##[debug]Request Id: bc59b202-7c03-47f3-a75f-4b3d32e47ac2
2025-07-16T17:02:27.6415237Z ##[debug]Error Details:
2025-07-16T17:02:27.6425854Z ##[debug] [Code= ValidationError, Message= 'url' should not be empty., Target= url]
2025-07-16T17:02:27.6436926Z ##[debug] [Code= ValidationError, Message= 'protocol' should not be empty., Target= protocol]

Repro steps

NA

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions