To ensure courses and training plans are created successfully you need to have ‘Custom Script’ options enabled in the tenant settings.
To do this, follow the steps:
- Go to the SharePoint Admin Center;
- Select Settings;
- Under Custom Script select ‘Allow users to run custom script on personal sites’ and ‘Allow users to run custom script on self-service created sites’:
- Click OK button. It takes about 24 hours for the change to take effect.
For more information see the following link.