Hello @Andreas Svensson ,
Thanks for reaching out.
I digged into this issue and found that CopyKeys script completely relay on set-AzKeyVaultAccessPolicy
cmdlet which belong to Access policy model since above error is expected when we use Azure Key Vault with Azure RBAC permission model instead Access policy model.
Here is similar issue reported at GitHub : https://github.com/MicrosoftDocs/azure-docs/issues/78351
Just wondering when you try with account which has Key vault administrator role
along with Key Vault Contributor
role. Please let us know outcome. Thanks !
Hope this helps.
------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.