The local user account must have the same username and password on both the managed device and the shared server that has the user profile stored because Windows authenticates the user before loading or saving the profile across the devices.
Provide the necessary permission on the shared location to users whose profile is configured for roaming.