KB #1010: Cannot change WebPart Export Mode to 'All'. WebPart will be skipped
Challenge
When performing a backup of some SharePoint sites, a warning may appear if the modern app-only authentication method is used.
Cannot change WebPart ExportMode to 'All'. WebPart will be skipped
Solution
To allow changing the "Export Mode", you need to enable the "Allow custom script" option on the affected SharePoint sites.
For Personal Sites or OneDrives, follow these steps:
https://docs.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script#to-allow-custom-script-on-onedrive-or-user-created-sites.
For any other SharePoint sites, follow these steps:
https://docs.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script#to-allow-custom-script-on-other-sharepoint-sites.
Cause
To back up web parts with the Device code, Veeam Backup for Office 365 requires to change the Export mode property of the web part from "False" to "True" to make this Web Part exportable and available for backup. Sometimes changing the "Export Mode" property is prohibited by a SharePoint administrator and thus Veeam Backup for Office 365 cannot change it and back up the Web Part. In this case, the "Cannot change WebPart ExportMode to 'All'. WebPart will be skipped" warning is shown.