I have written the SPE powershell script in my local Sitecore 9.1.1 sandbox environment and trying to execute, it is asking session elevate privilege to enter credentials. Even though I am entering admin credentials I am getting "Could not validate access using the provided credentials" error.

  1. I have verified Cognifide.PowerShell.config is present.
  2. I have enabled the Cognifide.PowerShell.IdentityServer.config since I am using Identity server
  3. SPE version 5.1 which is compatible with Sitecore 9.1.1

enter image description here

  • Where are you hosting it? Commented Jun 26, 2020 at 15:00
  • Did you implement a custom provider or using Azure AD? Commented Jun 26, 2020 at 15:37
  • It is in my local sandbox which is installed in my laptop. I am using default "admin" login Commented Jun 29, 2020 at 3:59
  • 1
    @PrabhuRanganathan Did you find a fix for this issue? we are facing the same issue.
    – Bala
    Commented Oct 21, 2020 at 15:47
  • 2
    @Bala - I changed the elevationAction="Allow" for the required tokens under <userAccountControl><tokens> from Cognifide.PowerShell.config to make it work. I am not sure this is the solution for this since this is related to some permission issue. But it worked for me. Commented Nov 11, 2020 at 6:47

1 Answer 1


You can achieve this by adding the below config

<configuration xmlns:set="http://www.sitecore.net/xmlconfig/set/">
                    <token name="ISE" set:expiration="00:05:00" set:elevationAction="Allow"/>

To assure this config file will be loaded after the SPE.config file name it zzz.MyConfig.config. Sitecore loads .configs file in alphabetical sort order so this might solve the issue.

You can also use patch:instead directive like below, but it still has to be loaded after SPE.config file, otherwise your configs will be replaced.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
                    <token name="ISE" expiration="00:05:00" elevationAction="Allow" patch:instead="*[@name='ISE']"/>

P.S. The configs that are declared in Layers.config file will be loaded first. For instance, let's say you are working in a helix based solution and you have this code block in your Layers.config file.

<layer name="Custom" includeFolder="/App_Config/Include/">
    <add path="Foundation" type="Folder" />
    <add path="Feature" type="Folder" />
    <add path="Project" type="Folder" />

So that, if you are creating your config under Foundation folder and the SPE.config file is not declared in Layers.config file, your config file will be loaded first and the SPE.config file will replace your configuration.






Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.