What Permissions do I need to generate a deploy script with SSDT?

It is sometimes useful to be able to use sqlpackage.exe to create a script that can be deployed manually or still automatically but at a later date plus you may not want to give the user or process that does this sysadmin permissions just so that it can generate a deploy script. The permissions you need in this case are:

SELECT permissions on dbo.__Refactorlog

VIEW DEFINITION at the database level

That is it - that is all you need to be able to generate a script, obviously if you want sqlpackage to do the deployment then you will need more generous permissions but this could be used as part of an automated process against a copy of a production database without being able to access any data within the database.