Set-AzSqlServerActiveDirectoryAdministrator : The 'parameters.properties' segment in the url is invalid

81 Views Asked by At

There is an issue with Set-AzSqlServerActiveDirectoryAdministrator not working in Azure DevOps release pipeline due to the latest az version 11.3.1 pushed by Azure to all pipeline agents. This could be because it uses az.sql = 4.14.0.

github open issue : https://github.com/Azure/azure-powershell/issues/23509

1

There are 1 best solutions below

0
Miao Tian-MSFT On

Workaround

As the issue is from Az.Sql 4.11.0, we can use the Az 10.4.1 which contains Az.Sql 4.10.0 before the bug issue is resolved.

In Azure PowerShell task, set the preferredAzurePowerShellVersion to 10.4.1.

- task: AzurePowerShell@5
  inputs:
    azureSubscription: 'wxcss'
    ScriptType: 'InlineScript'
    Inline: |
      # You can write your azure powershell scripts inline here. 
      Write-Host "Hello World"
    preferredAzurePowerShellVersion: '10.4.1'

Another workaround is to use the Azure CLI with az sql server ad-admin create command.