When attempting to schedule workflows with the API Token option in VCF Automation (VCFA) Embedded Orchestrator utilizing a Provider Consumption Org (PCO), the operation fails. The following exact error is observed:
Failed to schedule workflow. org.springframework.security.authentication.AuthenticationServiceException: Can not login in VMware Cloud Foundation Automation with username and password caused by: Can not login in VMware Cloud Foundation Automation with username and password caused by: 400 Bad Request: "
{"error":"invalid_grant","error_description":"Invalid refresh token","error_uri":null,"minorErrorCode":"invalid_grant","message":"Invalid refresh token","stackTrace":null}"
VCF Automation 9.x
Important Prerequisite: Before proceeding with the workaround steps, please ensure you have taken a full, native backup of your VCF Automation 9.x cluster. Please be aware that traditional vCenter VM snapshots are not supported for this appliance and should not be used as a rollback method.
Get the Organization ID for the Provider Consumption Org (PCO) from the VCF Automation client. This can be done by logging into the PCO, clicking on the top right corner where the username is located, and clicking the "Copy" button right next to the ID.
SSH into the VCF Automation appliance.
Update the Orchestrator tenant by running the following command (replace <PCO_ID> with the copied ID from step 1): kubectl -n prelude set env statefulset/vco-app DEFAULT_ORG='<PCO_ID>' -c install-rpms
Restart the vco-app pods to apply the changes:kubectl -n prelude delete pods -lapp=vco-app