SharePoint 2019 - SharePoint Workflow Manager - App principal does not exist

durica 0 Reputation points
2026-01-06T21:42:14.78+00:00

I am using SharePoint Workflow Manager (16.0.19127.20336) on SharePoint 2019 (16.0.10417.20075). I noticed that any workflows are failing to run.

Error after starting WF 2013:

Details about the last request: HTTP Forbidden at _api/web/lists(guid'xxxxxxxxx')

I have imported the workflow certificate to manage trust in the central admin sharepoint. I can create and edit workflows 2013 in SharePoint Designer. The test workflow 2013 only includes writing to the workflow history.

Can you please help me solve this problem?

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2026-01-06T21:42:24.9933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    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:

    1. 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.
    2. Register the SPAppPrincipal: If the App Principal does not exist, you can register it using PowerShell commands. This involves using the Set-SPAppPrincipalPermission cmdlet to grant the necessary permissions to the App Principal on the SharePoint site. Make sure to include the -EnableAppOnlyPolicy parameter if the App Principal had App-Only permissions on the SharePoint site.
    3. 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.
    4. 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.
    5. 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:

    0 comments No comments

  2. Matthew-P 8,940 Reputation points Microsoft External Staff Moderator
    2026-01-07T02:36:15.7466667+00:00

    Hi durica

    Welcome to Microsoft Q&A Forum! Have a good day and I hope you're doing well!

    Thank you so much for reaching out. The error you’re seeing: 3002002; reason=App principal does not exist. Based on my research, this indicates that the App Principal does not exist or has been removed. Importing the certificate into Manage Trust was the right step to establish trust, but there’s another piece: the App Principal must be registered using Register-SPWorkflowService so Workflow Manager can obtain a token to call SharePoint’s REST API. 

    Steps commonly used to resolve this: 

    I. Open SharePoint 2019 Management Shell as Administrator and run: 

    Register-SPWorkflowService `
        -SPSite "https://your-webapp-url" `
        -WorkflowHostUri "https://workflow-hostname:12290" `   # or :12291 if using HTTP
        -AllowOAuthHttp `
        -Force
    

    Note: Using -Force is what re-creates the missing App Principal so Workflow Manager can obtain an OAuth token again.

    II. Then:  

    1. Perform an IISReset on the SharePoint and Workflow Manager servers. 
    2. Restart these two services on the Workflow Manager server:  
    • Service Bus Message Broker 
    • WorkflowServiceBackend 

    References: 

    In my testing environment, I don’t have a live SP2019 farm to verify this right now, so I recommend giving these steps a try and letting me know how it goes. I’ll continue reviewing additional documentation and related cases to gather more insights so we can troubleshoot together if needed. 

    I hope the information I’ve shared will clarify things for you, provide some insights, and help at least partially. If I’ve misunderstood anything or if something is unclear, feel free to let me know. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".    

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  


  3. durica 0 Reputation points
    2026-01-08T09:24:27.4933333+00:00

    In the ULS log, I have:

    The app principal i:0i.t|ms.sp.ext|f9251d09-7050-feb9-f3ed-b4fbae204c8b@4429e03e-d5b4-4354-b22b-805be7bd2896 does not exists.

    After starting WF 2013, I also get the following error:User's image

    RequestorId: 9c54832f-b9d8-7ddc-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 403 {"X-SharePointHealthScore":["0"],"x-ms-diagnostics":["3002002; reason=App principal does not exist"],"SPRequestGuid":["9c54832f-b9d8-7ddc-be24-bf82303cd0da"],"request-id":["9c54832f-b9d8-7ddc-be24-bf82303cd0da"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"Content-Security-Policy":["frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com;"],"MicrosoftSharePointTeamServices":["16.0.0.10417"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Wed, 07 Jan 2026 14:55:06 GMT"],"Server":["Microsoft-IIS/10.0"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    When I am using the command:

    $clientID = "**PII REMOVED**"
    $site = Get-SPSite https://domain.com
    $realm = Get-SPAuthenticationRealm -ServiceContext $site
    $appIdentifier = $clientID + "@" + $realm
    $appPrincipal = Get-SPAppPrincipal -NameIdentifier $appIdentifier -Site $site.RootWeb
    Set-SPAppPrincipalPermission -EnableAppOnlyPolicy
    

    I get the error:

    Get-SPAppPrincipal : The app principal could not be found.
    

    Workflow 2013 only writes to the workflow history list and then WF cancel:User's image

    I don't have any applications available at the URL "https://www.domain.com/_layouts/15/appprincipals?Scope=Web".

    When I go to "https://domain.com/_layouts/15/appinv.aspx" enter the application ID "PII Removed" in the input field, and then click "Search," nothing is returned.

    User's image

    It still doesn't work for me. Can you tell me where I might be going wrong?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.