That law only mentions the necessary requirements for someone to be a “fiador” (co-signer). It has nothing to do with getting a NIF. I don’t know where people here got the idea that you always need a cosigner for obtaining a NIF, which is totally false.
According to the law and as you can see if you go to the Portuguese government website talking about how to obtain a NIF (https://www.portaldocidadao.pt/web/autoridade-tributaria-e-aduaneira/numero-de-identificacao-fiscal-pessoa-singular) all you need is a national ID card if you’re from the EEA or a passport for anyone else if you are a resident. THERE ARE NO FURTHER REQUIREMENTS!
You only need a tax representative (not a fiador) if you aren’t a resident (basically if you don’t have a permanent address) and that person will basically serve to receive your mail from the Portuguese tax authorities. If you have a permanent property that you keep as a holiday house or something like that, you qualify as a resident and don’t need a representative.
On another point, a NIF is only required if you have to pay taxes in Portugal, otherwise, if you’re asked for one you can simply say you’re not a resident and don’t have one. No one will stop you from opening a bank account or get an internet contract because of that, tough I’ll freely admit the standard procedure is made around you having one. Nonetheless, if you need to get a utility contract you already have a permanent address to qualify as a resident, don’t you?
I’m a Portuguese national, I’ve read the actual law in Portuguese, the mentioned website from the government and asked my mother who works in the Portuguese treasury.
I have no idea where you all got the “fiador” thing from. You only need one to apply for loans.
As a final point unlike what’s here mentioned multiple times, a “tax representative” and a “fiador” are totally unrelated things. The first is someone (pretty much always a lawyer though not strictly mandated by law to be such) that you give permission to represent you on tax matters, while the second is someone (usually a spouse or parent) that will vouch for you to get a loan and will assume the debt if you default on your payments