When configuring an XM Cloud project for running Powershell scripts in XM Cloud Powershell ISE the following error might appear:
Could not validate access using the provided credentials
To prevent the error, proceed as follows:
- On the tab Home open Manage my Projects.
- Click View Project on the selected project.
- Click the button Options and choose Environment variables.
- On the opened tab set the SITECORE_SPE_ELEVATION value to Allow.
Note: Only set the SITECORE_SPE_ELEVATION value to Allow for a local environment.
- After updating the environment variable, trigger build and deploy again for your XM Cloud project.
For more details on Environment variables refer to the official Sitecore documentation.