Error when deploying a role in a package via PowerShell

  • 16 February 2021
  • 0 replies
  • 9 views

Badge +5

Issue

K2 Package deployed via PowerShell hits an error when deploying a role. Deploying the same package via K2 Package and Deployment tool has no issues.

 

Error Code

{K2 Service Account} has does not have Modify rights on the '{Role Name}' Role.

 

Diagnosis

When deploying a package via PowerShell, we are attempting to overwrite the role which would work if it were created by the same user (K2 Service Account) whereas from the K2 Package and Deployment tool, we use the existing role.

 

Workaround

Edit the output XML (result of Write-DeploymentConfig) and change "Default" to "UseExisting" when deploying roles:

 

from:

<resolve name="{Role Name}" namespace="urn:SourceCode/Identities/Roles" action="Default" />


to:

<resolve name="{Role Name}" namespace="urn:SourceCode/Identities/Roles" action="UseExisting" />

Additional Information

This has been identified as a bug to be fixed in a future release of the product. Which version this will be included in, if any, has not been determined at this time. 

 

Related Links


0 replies

Be the first to reply!

Reply