Here is the list of document requested by the authorities to establish different types of residence permits.
Each of these is a link that will take you to the official website. We found an English version, but it is clearly out of date.
obtention ou le renouvellement de la carte d’immatriculation pour un étranger au Maroc