Open allencasteran opened 2 years ago
Thanks for reporting. We believe this inconsistency should be resolve by service side. I reply team member to look into it further.
Hello @allencasteran Sorry for the delayed response. Just checking if you were able to use the AD security group in this case as per the requirement?
The example given came from the attempt to set an AD security group via the Powershell command. The same group can be set via the Azure Portal UI.
As shown in the examples, the last REST call made by the module was not formed correctly and missing the api-version param.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.
Author: | allencasteran |
---|---|
Assignees: | - |
Labels: | `SQL`, `Service Attention`, `bug`, `question`, `customer-reported` |
Milestone: | - |
Re-Directing to the Service team for further action on this issue!
Hi @SatishBoddu-MSFT , is there any information when this will be resolved ?
This issue hit use after Az 7. was released on Microsoft Hosted Azure agents. I hope there will be a fix for this soon.
I face still this issue. Is there already any news?
I am also facing this issue. However, pinning Az.Sql to version 3.5.0
works.
`
Install-Module -Name Az.Sql -RequiredVersion 3.5.0 -Force
Import-Module -Name Az.Sql -RequiredVersion 3.5.0 `
I can also confirm that this issue is still happening. It would be great if this would be addressed properly soon.
I have the same error in pipeline deployment.
Set-AzSqlServerActiveDirectoryAdministrator : Operation returned an invalid status code 'BadRequest'
2022-03-05T15:41:23.0027044Z ##[debug]At D:\a\1\s\RGDeployment\RGDeployment\Scripts\Modules\Get-SQLFunctions.psm1:115 char:5
2022-03-05T15:41:23.0059534Z ##[debug]+ Set-AzSqlServerActiveDirectoryAdministrator -ServerName $AzureSQL ...
2022-03-05T15:41:23.0104675Z ##[debug]+ ~~~~~~~~~~~~~
2022-03-05T15:41:23.0126404Z ##[debug] + CategoryInfo : CloseError: (:) [Set-AzSqlServer...ryAdministrator], OdataErrorException
2022-03-05T15:41:23.0147351Z ##[debug] + FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet.SetAzureSqlServer ActiveDirectoryAdministrator
I had 'C:\Modules\az_7.1.0\Az.Sql\3.7.0\Microsoft.Azure.PowerShell.Cmdlets.Sql.dll'. installed in the pipeline. now reverting to version 3.5 fixed the issue in the yml.
- stage: 'Artifact'
displayName: 'Artifact Build'
dependsOn: TestARMTemplates
jobs:
- template: ${{ variables.artifactTemplate }}
- job:
steps:
- task: AzurePowerShell@5
inputs:
azureSubscription: '###############'
ScriptType: 'InlineScript'
Inline: 'Install-Module -Name Az.Sql -RequiredVersion 3.5.0 -Force'
FailOnStandardError: true
azurePowerShellVersion: 'LatestVersion'
@azureSQLGitHub Is this being looked at or reviewed? We are experiencing this issue as well and forcing version 3.5 of az.sql is less than ideal.
This was resolved in AZ 7.5.0 which has Az.Sql v 3.8.0
Description
Calling Set-AzSqlServerActiveDirectoryAdministrator to set the AD Administrator to an AD group is failing with a "BadRequest"
Debug output shows the second REST call within the process is not including the api-version param and failing.
Testing the REST call in a browser duplicates the error. After adding the api-version to the REST call in the browser it no longer reports the missing api-version error but reports Access token missing or malformed as expected for that test.
Issue script & Debug output
Environment data
Module versions
Error output