We create home folders using custom command:
Service account to perform operations within the domain has:
a) domain admin rights
b) server admin rights
On the server where home folders are the Service account belongs to Local adminstrator group (+domain group server admins are also belong to servers Local admins).
Folder containing home folders access rights include Service account: Service account has Full Access.
Still we get this error when custom command is used:
Failed to designate the user as the directory owner, however the user was granted the Take Ownership permission.