'Social security number format missing under masking field format

I implemented the dynamic data masking in my current project, for that I created the Azure SQL database and table. After that I went to dynamic data masking option in azure portal, then click on dynamic data masking option it will open snapshot like this below figure.

enter image description here

But in the above image there is no social security number format under masking field format.

How can I see the social security number format under masking field format option?



Solution 1:[1]

After did R & D on how to mask the social security number in azure SQL database. I think Dynamic data masking provides for four different built in masking functions (default, Email, Custom String, and Random) see the below for more information.

SQL Server 2016 New Features: Security and Encryption

https://www.teamscs.com/2016/01/sql-server-2016-new-features-security-encryption/

That’s why we are not able see the social security number format under masking filed format option in Azure Portal.

So, I followed below link to implement the above concept.

Dynamic Data Masking

https://msdn.microsoft.com/en-us/library/mt130841.aspx

For Example:-

 ALTER TABLE [dbo].[CustomerTables]
 ALTER COLUMN [SSN] ADD MASKED WITH (FUNCTION = 'partial(0,"XXX-XX-",4)');

Pradeep

Solution 2:[2]

Thanks Pradeep - indeed this is valid way to implement a relevant masking function for Social Security Numbers which exposes the last 4 digits. We currently don't support a built-in function that applies this format, though as you can see it is very easy to create such a format using the Custom string/ partial masking function. Please do reach out if you have any additional questions. Thanks!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 user7453088