Restrict Excel Workbook Access Without a Tax ID or MAC Address
Question details
The user wants to restrict access to an Excel workbook using a tax identification number and a device MAC address.

- Product
- Microsoft Excel and Microsoft 365
- Device & OS
- not provided
- Scenario
- Control who can open a workbook containing sensitive information.
- Observed behavior
- Tax IDs or MAC addresses stored in a workbook or VBA code can be inspected or bypassed, and a MAC address is not a reliable way to identify remote users.
Identify the people who need access and confirm that the workbook can be stored in a Microsoft 365 OneDrive or SharePoint location. Ask your Microsoft 365 administrator about multifactor authentication and your organization's sharing policies.
Use Microsoft 365 Permissions and Multifactor Authentication
Use identity-based sharing to grant workbook access to specific people rather than checking a tax ID or MAC address in Excel.
A tax ID is sensitive information, not a secure authentication secret. A MAC address can be changed and is not a reliable identifier for someone connecting remotely.
For sensitive data, keep the authoritative data on a protected server or service and grant access through authenticated accounts. Do not embed credentials in the workbook or VBA code.
In Excel, select File > Save As and save the workbook to your organization's OneDrive or SharePoint location.
Select Share, open the link settings, and choose Specific people if available. Enter the intended recipients and choose whether they can edit before sending the link.
Ask your Microsoft 365 administrator to require multifactor authentication for the accounts accessing the file using the organization's Microsoft Entra security settings.
In OneDrive or SharePoint, select the file and open Manage access to review or remove people and sharing links that are no longer needed.

Work with Excel Files in WPS Office
WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. Open existing Excel files to make the move easier, while continuing to manage sensitive-file access through your organization's secure sharing service.

Frequently Asked Questions
Can Excel VBA securely check a tax ID before opening a workbook?
No. A tax ID or comparison stored in a workbook or VBA code can be inspected or bypassed. Use Microsoft 365 identity-based permissions instead, and avoid embedding sensitive identifiers or credentials in the file.
Can a MAC address identify a remote workbook user?
Not reliably. A MAC address can be changed and is not a dependable identity check across networks. VBA may read a local MAC address for inventory, but it should not be used as the sole authorization method.
How do I remove someone’s access to a shared workbook?
In OneDrive or SharePoint, select the workbook and open Manage access. Remove the person's access or the relevant sharing link, and review any other permissions that might still grant access.
Does sharing with specific people prevent all copying?
No. Specific-people links restrict who can use the link, but authorized users may still be able to download or copy content depending on your organization's settings. Review the available sharing and download controls with your administrator.




