How do you identify orphaned apps in SharePoint server 2016

UnderwoodMarlene-1858 135 Reputation points
2025-12-01T21:47:56.61+00:00

Central Admin has an error "content databases contained orphaned apps." The orphaned app isn't identified in the error message.

I ran stsadm for each content database and cannot find any orphans.

Note: This error occurred after a hardware / storage failure.

Referenced article.

https://www.sharepointdiary.com/2011/07/delete-orphaned-site-collections-in-sharepoint.html

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

2 answers

Sort by: Most helpful
  1. Teddie-D 8,640 Reputation points Microsoft External Staff Moderator
    2025-12-02T04:04:44.47+00:00

    Hi @UnderwoodMarlene-1858 

    Thank you for posting your question in the Microsoft Q&A forum. 

    The “orphaned apps” alerts in SharePoint Server 2016 can be especially challenging to resolve, particularly when they stem from prior hardware or storage failures. Unfortunately, there isn’t a supported GUI option or PowerShell command that will reliably identify these issues. 

    In most cases, the Health Analyzer or standard enumeration tools don’t detect them, because from SharePoint’s perspective the apps no longer exist in the site map or structure. However, remnants of the app installations may still remain in the SQL content databases, typically in tables such as AppInstallations or AppInstances, which causes the alerts to persist. 

    Some users have managed to identify orphaned apps by querying the database directly. This method is reported in several community posts:  

    Note: Microsoft is providing this information as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.
    It’s important to note that directly editing or deleting rows in SharePoint databases is not supported by Microsoft and carries significant risk. If you do explore this route, community guidance strongly recommends doing so only in a controlled environment, with full backups in place. 
    I hope this information is helpful. 


    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.  


  2. UnderwoodMarlene-1858 135 Reputation points
    2025-12-04T15:45:15.91+00:00

    The Microsoft tech needs to file an escalation to get permission to manually delete the data from the tables. Today we looked at AppPackages, appSourceInfo, AppInstallations, AppDatabaseMetadata, AppInstallationProperty, AppLifecycleErrors to identify the records for the Instance (not the entire App) that needed to be deleted.

    Feel free to close this item. Thank you for your assistance.


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.