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
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
preferredAzurePowerShellVersionto 10.4.1.Another workaround is to use the Azure CLI with az sql server ad-admin create command.