Leaders of the Auckland University Students' Association (AUSA) were outraged by the actions of the protester, who is not a student at the university.
President of the AUSA Arena Williams said: "Throwing cake isn't protest. It's a childish act of aggression.
"Plenty of students were able to articulate their views on the Ports of Auckland dispute rationally and respectfully.''
Vice-President of AUSA Daniel Haines said he hoped the man's actions would not prevent the mayor from returning to the university.
"It's unfortunate that the Mayor in the Chair session ended like this. What was a rare opportunity for students to speak with the mayor about Auckland wide concerns was cut short,'' he said.