Rotation and orthographic scale camera

Hi,

I have a scene with an orthographic camera at a certain position
and multiple objects placed in the scene on different locations.

How can I calculate the rotation and orthographic scale of the camera
so that all objects fit in the camera viewport ?

Thanks for any help.
Regards