How to Get SharePoint Online Visitor Reports Using PowerShell
Question details
The user needs to retrieve and export visitor activity and usage reports for a SharePoint Online site.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Tracking user activity, identifying site visitors, and monitoring overall usage metrics for SharePoint sites.
- Observed behavior
- The user is looking for administrative methods such as PowerShell, Microsoft Graph, or the Microsoft 365 Admin Center to successfully generate and download these usage reports.
Ensure you have SharePoint Administrator or Global Administrator privileges in Microsoft 365, and verify that the latest PnP PowerShell module is installed if you plan to use command-line scripts.
Export Visitor Reports from Microsoft 365 Admin Center
The most straightforward, GUI-based method to get visitor reports without writing scripts.
Microsoft 365 provides built-in usage reports within the admin center. This method is highly recommended for administrators who prefer a visual interface over command-line tools to generate and export site activity logs.
Log in to the Microsoft 365 Admin Center using your administrator credentials.
On the left-hand navigation menu, click on 'Reports' and then select 'Usage'.
Scroll down to find the SharePoint section or select 'SharePoint files' from the dashboard.
Click on the 'Site usage' tab to view metrics such as active sites, total files, and specific visitor activities.
Click the 'Export' link on the right side above the data table to download the visitor and activity report as a CSV file.

Retrieve Site Analytics Using PowerShell PnP
Ideal for IT admins who want to automate report generation and extract SharePoint analytics via the command line.
Query SharePoint Activity Using Microsoft Graph API
Best for developers looking to integrate SharePoint usage data into custom dashboards or third-party applications.
Analyze Your Exported SharePoint Reports with WPS Office
After exporting your SharePoint visitor reports as CSV files using PowerShell or the Admin Center, you need a robust spreadsheet tool to review the data. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, making it incredibly easy to filter, sort, and visualize your SharePoint site usage data.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your operating system.
- 2. Open the Exported Report: Launch WPS Spreadsheet and open the CSV usage report you downloaded from SharePoint Online.
- 3. Analyze the Data: Use built-in filters, pivot tables, and charts to analyze visitor trends and site activity easily.

Frequently Asked Questions
Can site owners view SharePoint usage data without Admin Center access?
Yes, site owners can view basic site usage by navigating to their SharePoint site, clicking the Settings gear icon, and selecting 'Site usage'. This provides visual graphs of visitor trends without requiring global administrator rights.
Why is the PowerShell visitor report missing specific user names?
By default, Microsoft 365 obscures user-level details to protect privacy. An administrator must go to the Microsoft 365 Admin Center > Settings > Org settings > Reports, and uncheck the option to 'display concealed user, group, and site names in all reports'.
What format are the exported Admin Center reports in?
Reports exported from the Microsoft 365 Admin Center are saved in CSV (Comma Separated Values) format. These files can be easily opened, formatted, and analyzed in spreadsheet software like WPS Spreadsheet or Microsoft Excel.




