Fix Office 365 Management API Token Tenant Not Found Error
Question details
An application successfully obtains an access token for the Office 365 Management Activity API under an Exchange Foundation License, but subsequent audit-log requests fail with a tenant-not-found message.

- Product
- Microsoft Entra ID / Office 365
- Device & OS
- not provided
- Scenario
- Attempting to retrieve audit logs using the Office 365 Management Activity API with limited tenant licensing.
- Observed behavior
- The system grants an access token without issue, but the actual audit-log requests fail with a tenant-not-found error message due to unavailable Unified Audit Log ingestion.
Ensure you have global administrator or security administrator privileges in your Microsoft 365 tenant to verify licensing and modify Unified Audit Log settings.
Enable Unified Audit Log Ingestion
Turn on audit logging in the Microsoft Purview compliance portal to resolve the tenant-not-found error when querying the API.
A successful token request merely validates authentication. If the Unified Audit Log ingestion is disabled, the tenant cannot be found by the audit service, resulting in failure.
Go to the Microsoft Purview compliance portal and sign in with your administrator credentials.
In the left navigation pane, select 'Audit' under the Solutions menu.
If auditing is not enabled, you will see a banner prompting you to 'Start recording user and admin activity'. Click this banner to enable Unified Audit Log ingestion.

Verify API Permissions and Licensing
Check that your application has the correct permissions in Microsoft Entra ID and that your tenant licensing covers the requested activity data.
Simplify Your Workflow with WPS Office
Troubleshooting Office 365 API tokens, complex licensing, and tenant configurations can be exhausting. If you are looking for a straightforward, lightweight solution for creating and editing your daily documents, WPS Office is an excellent free alternative.
- 1. Download the software: Visit the official WPS Office website and download the free version for your operating system.
- 2. Install and launch: Run the installer, follow the on-screen prompts, and launch the application.
- 3. Edit with ease: Open your existing Microsoft Office files directly in WPS Office and start editing without worrying about licensing issues.

Frequently Asked Questions
Why did I receive an API token if my tenant isn't licensed properly?
A successful access token request only verifies your authentication credentials with Microsoft Entra ID. It does not validate whether Unified Audit Log ingestion is enabled or if the tenant holds the required service plans.
How do I fix the tenant-not-found error when querying the Management Activity API?
This error typically means Unified Audit Log ingestion is turned off for your tenant. You can resolve it by navigating to the Microsoft Purview compliance portal and enabling audit logging.
Does the Exchange Foundation License cover Office 365 Management Activity API usage?
The Exchange Foundation License provides limited capabilities. Depending on the specific audit logs and activity data your application requests, you may need a higher-tier Microsoft 365 license plan.




