Coffee shops in Maastricht only accept dutch citizen. If you are working in the netherlands or here for study, you can register at the GBA register. (when you rent a room or appartment). With the GBA inscription and your passport or ID card is the only way for a tourist to enter a Maastricht coffeeshop. The closest town or cities where they do accept foreigners are Kerkrade, Eindhoven or Tilburg.
Cannabis Coffee Shops by City:
Coffee shops near the borders with Belguim and Germany do not aloud tourists. You have to be a dutch citizen or you have to work in the Netherlands to get in and buy your cannabis.
So if you temporarely work or study, get a proof at the city counsel and ask for a GBA-Uitreksel.