MethodInvocationException error appears during the installation of Sitecore Experience Commerce


Description

When running Deploy-Sitecore-Commerce.ps1, the following error message appears:

Attempt to set permissions failed. Error: System.Management.Automation.MethodInvocationException
Exception calling "SetAccessRule" with "1" argument(s): "This access control list is not in canonical form and therefore cannot be modified."

Solution

To resolve the issue, upgrade Sitecore XC instance to Sitecore XC 9.2.0 or later.