Liquid crystalline (LC) materials are especially suited for the preparation of active 3D/4D microstructures using two-photon laser printing. To achieve the desired actuation, the alignment of the LCs has to be controlled during the printing process. In most cases studied to date, the alignment relied on surface modifications and therefore, complex alignment patterns and concomitant actuation were not possible. Here, we introduce a strategy for spatially aligning LC domains in three-dimensional space by utilizing 3D-printed polydimethylsiloxane-based microscaffolds as confinement barriers, which induce the desired director field. The director field resulting from the boundary conditions is calculated with Landau de Gennes theory and validated by comparing experimentally measured and theoretically predicted birefringence patterns. We demonstrate our procedures for structures of varying complexity and then employed to fabricate 4D microstructures that show the desired actuation. Overall, we obtain excellent agreement between theory and experiment. This opens the door for rational design of functional materials for 4D (micro)printing in the future.