Permission & Access Issues

Can Excel VBA List Users with Restricted Access to an Excel File?

Tauseeq MagsiTauseeq Magsi Nov 13, 2026 868 views

Question details

The user wants to know whether Excel VBA can list users with restricted access to an Excel file stored in SharePoint, OneDrive, or a network location, and what supported alternatives exist.

Can Excel VBA List Users with Restricted Access to an Excel File?
Product
Microsoft Excel VBA (SharePoint/OneDrive hosted files)
Device & OS
not provided
Scenario
The user has an Excel file hosted in SharePoint, OneDrive, or a network share and needs to audit restricted user permissions programmatically.
Observed behavior
The goal is to obtain an accurate restricted-user permission list from the file hosting service or network administrator because Excel VBA does not expose file-level permission data.
Before you start

Before checking restricted access, confirm where the Excel file is stored (SharePoint, OneDrive, or a network share) and ensure you have or can contact an account with admin, site owner, or network administrator privileges.

Solution 1Recommended

Check Restricted Users in Microsoft 365 Admin Center or SharePoint Permissions

Best for SharePoint and OneDrive files when you have admin access and need a built-in permissions view without writing API code.

Excel VBA does not expose file-level permission data for SharePoint or OneDrive. Microsoft 365 and SharePoint admin tools are the supported way to view and audit restricted access.

1
Open Microsoft 365 admin center

Sign in at admin.microsoft.com with an account that has SharePoint Administrator or Global Administrator permissions.

2
Open the SharePoint admin center

In the left navigation, expand Admin centers and select SharePoint to open the SharePoint admin center.

3
Locate the file and manage access

Browse to the site or use Search, open the document library, select the Excel file, and choose Manage access or Details > Manage access to review users and groups.

4
Review or export permission information

Review the list of users with restricted or direct access, or generate a permission report from site permissions or Microsoft Purview audit tools as needed.

Check Restricted Users in Microsoft 365 Admin Center or SharePoint Permissions
Use admin tools instead of VBA: Microsoft 365 admin tools and Microsoft Graph are the supported ways to audit SharePoint and OneDrive file permissions.
Free Microsoft Office alternative

Use WPS Office as a Free Alternative for Excel Workbook Tasks

WPS Office cannot retrieve SharePoint or OneDrive permission lists through Excel VBA, but it is a free, lightweight Microsoft Office alternative that opens, edits, and saves Excel workbooks with familiar ribbon tools and strong .xlsx compatibility.

  1. 1. Download WPS Office: Go to the official WPS Office website and click Download WPS Office Free.
  2. 2. Install and launch WPS Spreadsheets: Run the installer, open WPS Office, and start WPS Spreadsheets.
  3. 3. Open your Excel workbook: Click Menu > Open, select the .xlsx file, and continue working with familiar formatting and formulas.
Opens and saves .xlsx, .xls, and .csv files with Microsoft Office format compatibilityFree and lightweight Office suite for everyday spreadsheet tasksFamiliar ribbon interface makes migration from Microsoft Excel easierAvoids SharePoint permission complexity when sharing workbooks locally or via cloud links
microsoft office alternative - wps office

Frequently Asked Questions

Can Excel VBA read SharePoint file permissions directly?

No. Excel VBA does not have a built-in method to return SharePoint or OneDrive file permission lists. Use SharePoint admin tools or Microsoft Graph API instead.

What Microsoft Graph endpoint lists file permissions?

Use GET /drives/{drive-id}/items/{item-id}/permissions. You need an Azure AD app registration and Graph permissions such as Files.Read.All or Sites.Read.All.

How do I check restricted users for an Excel file on a network share?

Contact your network administrator and request a review of the shared folder permissions, NTFS ACLs, or effective access for the file path.

Does WPS Office provide a VBA feature to list restricted users?

WPS Office does not retrieve SharePoint or OneDrive permission lists through VBA. It focuses on opening, editing, and sharing Excel-compatible workbooks.

Is it safe to manipulate Excel file permissions with VBA?

It is not recommended. Direct permission changes through VBA can create security risks and may violate privacy and security policies.