Search code examples
sql-serverazurevisual-studioazure-sql-databasesql-server-data-tools

SSDT - specify authorization user on schema create


I have a sqlproj XML for Azure SQL Database. I want to deploy database with several tables into specific schema which is also created using this build. How to specify what user should be used for CREATE SCHEMA [schema-name] AUTHORIZATION [user] ? By default it uses user dbo but I need to change it. How to specify it in the sqlproj?


Solution

  • It appeared the user (service principal) trying to deploy the solution to SQL Database was not set as an AAD admin on the SQL server. It seems a little bit strange to me, but it worked.