I have classified some columns in my Azure SQL Database with Data Classification sensitivity labels. In the SSDT project that corresponds to the database, SQL statements like the following are present:
ADD SENSITIVITY CLASSIFICATION TO
[dbo].[tablename].[UserName]
WITH (LABEL = 'Confidential', LABEL_ID = 'guid1'
, INFORMATION_TYPE = 'Credentials', INFORMATION_TYPE_ID = 'guid2');
The SSDT project builds fine in VS 2019 as well as in the Build task in Azure DevOps Build Pipelines. As expected, I had to use a VS 2019 (hosted) agent because prior versions of SSDT don't recognize that SQL syntax.
In the pipeline, the DACPAC for that project is successfully built. I am then trying to deploy that DACPAC using an Azure SQL Database deployment task. It uses the SqlPackage.exe version it finds in C:\Program Files\Microsoft SQL Server\150\DAC\bin\ on the hosted agent. It apparently doesn't recognize those SQL statements and fails with the following error:
The Element or Annotation class SqlSimpleColumn does not contain the Property class SensitivityLabel.
Is there a way to deploy a more updated SqlPackage.exe to a hosted build agent, or am I stuck waiting for Microsoft to update the image? Is there a way to pass a parameter to SqlPackage.exe instructing it to ignore those statements?