The six were found guilty of "contempt and violence against law enforcement officials, damage to public property and illegal entry into Morocco", the Alyaoum24 news site reported.
They were also fined 60,000 dirhams (about 5,500 euros) each, the news source said.
The six were arrested in Casablanca, the North African country's commercial capital, on January 16 after trouble in which a police officer was injured and five police vehicles damaged, reports at the time said.
Enass, a media outlet specializing in migrant issues, said the six "did not have access to legal aid" in the trial, which also was in Casablanca.
Enass, a media outlet specialising in migrant issues, said the six "did not have access to legal aid" in the trial, which was in Casablanca.