How to Filter MCAS Alerts by Alert ID with the API
Question details
The user is trying to filter Microsoft Cloud App Security (MCAS) alerts by Alert ID via an API request, but the query fails to return the expected results.

- Product
- Microsoft Cloud App Security API
- Device & OS
- not provided
- Scenario
- Querying specific security alerts using an API request with an OData filter such as 'ID eq alertID'.
- Observed behavior
- The API request does not return the targeted alert, likely due to unsupported OData query properties or incorrect filtering syntax.
Ensure you have active API tokens with the necessary Microsoft Graph Security permissions and verify that the target alert ID actually exists in your tenant environment.
Verify Supported OData Syntax and Alert Properties
Check the official Microsoft Graph API documentation to ensure the specific alert ID field supports the 'eq' filter operator.
Not all properties exposed by the Microsoft Graph Security API support OData filtering natively. The filtering syntax or the exact name of the property (such as providerAlertId instead of just ID) might differ from standard requests.
Navigate to the official Microsoft Graph API documentation for security alerts to see the list of filterable properties.
If the primary ID field is not filterable using the 'eq' operator, modify your OData query to use an alternative supported property, such as providerAlertId.
Open the Microsoft Graph Explorer tool, input your modified query, and run it to validate the syntax before deploying the code to your application.

Contact Microsoft API Support
Escalate the issue to the Microsoft Graph Security support team if the syntax is correct but the API continues to fail.
Looking for a Lightweight and Free Office Suite? Try WPS Office
While resolving complex enterprise API configurations, you might also be looking for a simpler, more cost-effective solution for your everyday document tasks. WPS Office provides a fully featured, free alternative to Microsoft Office, offering powerful tools for Word, Excel, and PowerPoint files without the heavy enterprise overhead.
- 1. Download the software: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the straightforward on-screen instructions to complete the installation in minutes.
- 3. Open existing files: Launch WPS Office and directly open your existing Microsoft Word, Excel, or PowerPoint documents without losing any formatting.

Frequently Asked Questions
Why does the 'ID eq alertID' filter return an error in the MCAS API?
The Microsoft Graph API restricts which properties can be filtered using OData parameters. The primary ID property might not support the 'eq' (equals) operator, or the specific field name required for filtering might be different, such as providerAlertId.
Where can I test my Microsoft Cloud App Security API queries?
You can securely test your API queries, including OData filters, using the Microsoft Graph Explorer. It allows you to run requests against your tenant data in a sandbox environment before updating your application.
What details should I provide when contacting Microsoft API support?
To get efficient help, provide the full API request URI, the headers (excluding sensitive tokens), the exact error response payload, your tenant ID, and the specific alert ID you were attempting to query.




