I have a command in my script called
Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName $ResourceGroupName -ServerName $SqlServerName -DisplayName $SqlServerAdmin
I have used proper values for these parameters. Thing is this command runs perfectly when I run it from Powershell ISE, but when I do the same in Azure Powershell Task in Azure DevOps, it returns an error saying:
2020-09-18T11:02:54.0670872Z ##[error]Operation returned an invalid status code 'Forbidden' I cant figure out what I am missing.