Skip to content
SQL Query to Find Microsoft 365 Apps Details from SCCM

SQL Query to Find Microsoft 365 Apps Details from SCCM

Written By Anoop C Nair
Last Updated September 13, 2021
Posted In SCCM
SHARE

Let’s check the SQL query to find Microsoft 365 apps details. The SQL query is to find Microsoft 365 app details from Add Remove program entries. You can get display name, publisher, and version details from add remove programs.

You can also download the office 365 reports (RDL files) from the following links Microsoft 365 Office Client Management Reports Part 1 and Microsoft 365 App Dashboard. Microsoft changed the brand name of Office 365 to Microsoft 365 apps.

I have explained Microsoft 365 Version vs. Build Numbers in the following post. You can have more details about the build numbers of Microsoft 365. You can also check SCCM Report Office 365 Client Upgrade Readiness Dashboard.

SQL Query to Find Microsoft 365 Apps

Let’s check how to use SQL query to find Microsoft 365 Apps. You should have SQL Management Studio installed and read-only access to SCCM DB to run the following query. Also, make sure that you try to run these SQL queries in a staging environment before running against production DB.

Patch My PC
SQL Query to Find Microsoft 365 Apps Details from SCCM
SQL Query to Find Microsoft 365 Apps Details from SCCM
  • Open the SQL Management Studio.
  • Connect your Database Engine.
  • Right Click on your database CM_XXX and click on ‘New Query’
  • Copy the following SQL query to find the report of Microsoft 365 Apps details.
  • Click on the Execute button.

NOTE! Take a look at one of the Windows 10 or Windows 11 devices installed with Microsoft Apps 365 to confirm the Add Remove program entries. I could see two different entries in some devices. 1. Microsoft 365 Apps for Enterprise and 2. Microsoft Office 365 Pro Plus (OLD version).

SQL Query to Find Microsoft 365 Apps Details from SCCM
SQL Query to Find Microsoft 365 Apps Details from SCCM

You can use the following SQL query to find out the Device Name, User Name, AD Site, Domain, App Display Name, and Version details of Microsoft 365 Apps.

Select Distinct
v_R_System.Name0 as 'Machine',
v_R_System.User_Name0 as 'User Name',
v_R_System.AD_Site_Name0 as 'Location',
v_R_System.Resource_Domain_OR_Workgr0 as 'Domain',
v_Add_Remove_Programs.DisplayName0 as 'App Display Name',
v_Add_Remove_Programs.Version0 as 'App Version'
From v_R_System
Inner Join v_Add_Remove_Programs on v_R_System.ResourceID = v_Add_Remove_Programs.ResourceID 
Where v_Add_Remove_Programs.DisplayName0 Like 'Microsoft 365 Apps%'
and v_R_System.Active0 = '1'

Results

You can find the results of the query similar to the screenshot below. You can add additional details into the above SQL query to collect more details about the support state of Microsoft 365 Apps etc.

You can easily create a Custom SCCM Report for Microsoft 365 Apps using the following query. You can refer to Create Custom Report Using Report Builder

SQL Query to Find Microsoft 365 Apps Details from SCCM

Resources

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 2 comments

  1. Hello Sir,

    How can we find the O365 application is 32 bit or 64 bit by pulling reports via SQL, if any SQL Query kindly share with us , thank you !

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read