The error you are encountering, specifically the "HTTP Forbidden" message when trying to run workflows in SharePoint 2019 with Workflow Manager, typically indicates a permissions issue related to the App Principal. Here are some steps you can take to resolve the issue:
- Check App Principal Permissions: Ensure that the App Principal has the necessary permissions to access the resources required by the workflow. You may need to register the App Principal correctly using PowerShell commands to ensure it has the right permissions.
- Register the SPAppPrincipal: If the App Principal does not exist, you can register it using PowerShell commands. This involves using the
Set-SPAppPrincipalPermissioncmdlet to grant the necessary permissions to the App Principal on the SharePoint site. Make sure to include the-EnableAppOnlyPolicyparameter if the App Principal had App-Only permissions on the SharePoint site. - Republish Workflows: If the workflows were created before the App Principal was registered or updated, try republishing the workflows from SharePoint Designer. This can help ensure that they are correctly associated with the updated App Principal.
- Run Timer Jobs: Consider running the Refresh Trusted Security Token Services Metadata feed timer job to refresh the security token services, which may help resolve any issues related to authentication.
- Check Workflow Manager Configuration: Ensure that the Workflow Manager is properly configured and connected to your SharePoint farm. Any misconfiguration can lead to workflows failing to start.
If these steps do not resolve the issue, you may need to check the ULS logs for more detailed error messages that can provide further insight into the problem.
References: