Since 2019 and the Covid-19 crisis, you can't simply walk into a Portuguese tax office to request your NIF. AnchorLess offers a list of all Finanças offices in Portugal and their NIF request conditions to help you out.
If you are a foreigner and want to know more about the NIF, you can read our guide : what is NIF Portugal.