When using flash, manual is a good mode for the camera.
What lens? If a zoom, what focal length?
How many are in a standard group? How many wide and how many deep?
What colour are walls and ceiling? How high is the ceiling? How big is the room?
Do you have only a 580 EX II? Is it in the hot shoe?
I would love to be able to say “just do this”, but all this stuff matters to a successful result. The further you can get from your rows of people, the deeper the DOF. The shorter your lens, the deeper the DOF. The smaller the aperture, the deeper the DOF. Unfortunately, if you get into short lenses and stand relatively close, people’s noses tend to get larger relative to their faces and the first row people tend to grow relative to the second and subsequent rows, so what you have to work with makes a difference to how you might achieve the shot and the end result. Bounce or off camera flash gives nicer results, but you may need more flash power for that to work.