GDPR trick: auto mask sensitive data in Azure SQL databases

Wouter
4 min readMar 17, 2021

With GDPR being the biggest and most important buzzword of the past decade, tools and tricks to protect your data and access to sensitive information is crucial.

But did you know that Azure has a very powerful GDPR tool already? And it is really, really easy to set up! Azure supports Dynamic Data Masking. A way to hide sensitive data in a database without having to change any roles or permissions.

The only thing you’ll need is an Azure SQL database.

Setting it up

Just head over to the SQL database dashboard. In the navbar on the left scroll down till you see Dynamic Data Masking

And this is where the magic happens. This screen gives us an overview of all tables and columns in our database and allows us to apply a mask. The mask is what’s going to mask or censor data. Allowing us to hide certain info to non-privileged users.

To configure a mask simply select the table and column and select add mask.

--

--