How can a foreigner with a residence permit to get «Vergi Mükellefiyet yazısı» («Tax Liability letter»)?

The solution is to upgrade a «Potansiyel Vergi Kimlik Numarası» / «Non-citizen's potential tax number» to a real one.