This is done with Active Directory by specifying a home folder like described here: https://support.microsoft.com/en-us/help/816313/how-to-assign-a-home-folder-to-a-user#3.
Then we redirect the documents folder with group policy to %HOMESHARE%%HOMEPATH% (this results in a path like \\ATLiFaP01\STha$\ as my documents folder).