How to set or change the desktop background in configuration profile in Big Sur

Solution 1:

The com.apple.desktop payload supports two keys: locked if set to true will prevent the desktop picture being changed. override-picture-path can be used to set the path to the desktop picture. More information is given in the "Desktop Payload" section of the Configuration Profile Reference.

If you don't want to create a configuration profile by hand you can use a profile editor such as iMazing's Profile Editor.

This payload requires the picture to exist on the device. To my knowledge there is no way of embedding an image within a configuration profile.