You asked

Which lens for the canon eos 5d mark iv covers both portraits and groups?

For a 5D Mark IV, the guide's pick is a 35mm prime. The portraits page suggests a 35mm at f/1.8 or f/1.4 for environmental portraits that show where someone is, and for groups. On full frame, 35mm takes in several people without standing so far back that faces get small.

Whichever you choose, the guide's advice that light matters more than gear still holds. Face a window, turn your subject slightly, and expose for the face.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.