Search code examples
dacpacsqlpackage

Azure SQL Server database user login disabled after DACPAC publish


I have CICD pipeline setup for deploying the database using DACPAC.

I have arguments for sqlpackge.exe here

/p:ExcludeObjectTypes="Users;RoleMembership;Logins;ServerRoles;ServerRoleMembership"

This works fine, the users for the database is disabled with a red X after deploying. User cannot login after deploy

GRANT
CONNECT 
TO 
TheUser1

About code could enable the user again, but I don't want to touch any user permission in my pipeline


Solution

  • /p:ExcludeObjectTypes="Permissions" exclude Permissions will not revoke connect the user