Did you actually try adding it in fstab or did you only test it on the command line ?
x-systemd.automount won’t work on a mount command line as its not an actual file system mount option. It is a systemd option which is read from fstab. It doesn’t get passed to the underlying file system but instead signals systemd to create an automount unit for the mount point.
@oculos, just to help out a bit with understanding as I also got myself confused with the “invalid argument” issue.
As @DBMandrake wrote initiating the mount manually with mount /mountpoint will throw out the error as it is not designed for that.
This should be your line in fstab //<IP of Server>/<share name>/ /mnt/<mountpoint> cifs noauto,x-systemd.automount,iocharset=utf8,user,username=<username>,password=<password>,uid=osmc,gid=osmc,iocharset=utf8,file_mode=0770,dir_mode=0770 0 0
After you entered the line in fstab and you reboot if you just call mount you will not see the drive being mounted. That only will happen once a file operation is executed on the that filesystem e.g by ls /mnt/<mountpoint>
Thanks a lot @fzinken - it worked! Indeed, I was expecting it to show already when I reboot, but it didn’t. Then I followed your advice and performed a file operation, and BOOM, there it was! And I didn’t even need the ip address.