Being in possession of a valid passport is compulsory. Whether you need a visa depends on your nationality. Embassies and consulates can direct you before and during your journey.
Documents
To avoid any misunderstandings during your stay in Morocco, check that you have a valid passport in your possession.
Visa
No visa is required for European Union nationals or those from Switzerland and Canada. For all nationalities, the maximum length of a tourist visit is 90 days.
Embassies and consulates
When preparing for your departure, note the contact details for your embassy and the regional consulates. You can renew your papers there in the event of loss and obtain all sorts of advice (health, safety, etc.).
In general, all diplomatic offices have an emergency number to be called in emergencies. Most of the time an administrative department will be able to help you, even in the event of an emergency.