This is a known issue, impacting vCenter server versions 6.5/ 6.7/ 7.0.x/ 8.0.0
Clone virtual machine from one vCenter Server to another vCenter Server through PowerCLI script fails with the below error:
Exception calling "CloneVM_Task" with "3" argument(s): "Permission to perform this operation was denied"
The code which is used to perform this action might look similar to :
$VM.ExtensionData.CloneVM_task($folderObj.ExtensionData.MoRef, $vmObject.Name_New, $spec)
Note: This behavior is not observed every time during cross vCenter clone operation but is rather an exception. It can occur even though the User which is initiating the call to the clone API has the needed permissions on the destination vCenter server.
To avoid the issue, the connection to the source vCenter server must be done by SSO Administrator user e.g:
Connect-VIServer -Server $sourceVCserver -User '[email protected]' -Password 'Password@345'