diff --git a/windows/security/threat-protection/TOC.md b/windows/security/threat-protection/TOC.md index e37e6d8711..93955396d4 100644 --- a/windows/security/threat-protection/TOC.md +++ b/windows/security/threat-protection/TOC.md @@ -383,6 +383,7 @@ ##### [Microsoft Defender ATP APIs Schema]() ###### [Supported Microsoft Defender ATP APIs](microsoft-defender-atp/exposed-apis-list.md) +###### [Common REST API error codes](microsoft-defender-atp/common-errors.md) ###### [Advanced Hunting](microsoft-defender-atp/run-advanced-query-api.md) ###### [Alert]() diff --git a/windows/security/threat-protection/microsoft-defender-atp/common-errors.md b/windows/security/threat-protection/microsoft-defender-atp/common-errors.md new file mode 100644 index 0000000000..80062ce564 --- /dev/null +++ b/windows/security/threat-protection/microsoft-defender-atp/common-errors.md @@ -0,0 +1,86 @@ +--- +title: Common Microsoft Defender ATP API errors +description: List of common Microsoft Defender ATP API errors with descriptions. +keywords: apis, mdatp api, errors, troubleshooting +search.product: eADQiWindows 10XVcnh +ms.prod: w10 +ms.mktglfcycl: deploy +ms.sitesec: library +ms.pagetype: security +ms.author: macapara +author: mjcaparas +ms.localizationpriority: medium +manager: dansimp +audience: ITPro +ms.collection: M365-security-compliance +ms.topic: article +--- + +# Common REST API error codes + +**Applies to:** [Microsoft Defender Advanced Threat Protection (Microsoft Defender ATP)](https://go.microsoft.com/fwlink/p/?linkid=2069559) + +- Want to experience Microsoft Defender ATP? [Sign up for a free trial.](https://www.microsoft.com/microsoft-365/windows/microsoft-defender-atp?ocid=docs-wdatp-exposedapis-abovefoldlink) + +The error codes listed in the following table may be returned by an operation on any of Microsoft Defender ATP APIs. +
note that in addition to the error code, every error response contains an error message which can help resolving the problem. +
Note that the message is a free text that can be changed. +
At the bottom of the page you can find response examples. + +Error code |HTTP status code |Message +:---|:---|:--- +BadRequest | BadRequest (400) | General Bad Request error message. +ODataError | BadRequest (400) | Invalid OData URI query (the specific error is specified). +InvalidInput | BadRequest (400) | Invalid input {the invalid input}. +InvalidRequestBody | BadRequest (400) | Invalid request body. +InvalidHashValue | BadRequest (400) | Hash value {the invalid hash} is invalid. +InvalidDomainName | BadRequest (400) | Domain name {the invalid domain} is invalid. +InvalidIpAddress | BadRequest (400) | IP address {the invalid IP} is invalid. +InvalidUrl | BadRequest (400) | URL {the invalid URL} is invalid. +MaximumBatchSizeExceeded | BadRequest (400) | Maximum indicators batch size exceeded. Received: {batch size received}, allowed: {batch size allowed}. +MissingRequiredParameter | BadRequest (400) | Parameter {the missing parameter} is missing. +OsPlatformNotSupported | BadRequest (400) | OS Platform {the client OS Platform} is not supported for this action. +ClientVersionNotSupported | BadRequest (400) | {The requested action} is supported on client version {supported client version} and above. +Unauthorized | Unauthorized (401) | Unauthorized (usually invalid or expired authorization header). +Forbidden | Forbidden (403) | Forbidden (valid token but insufficient permission for the action). +DisabledFeature | Forbidden (403) | Tenant feature is not enabled. +DisallowedOperation | Forbidden (403) | {the disallowed operation and the reason}. +NotFound | Not Found (404) | General Not Found error message. +ResourceNotFound | Not Found (404) | Resource {the requested resource} was not found. + +## Body parameters are case sensitive + +The submitted body parameters are currently case sensitive. +
If you experience an InvalidRequestBody or MissingRequiredParameter errors, it might be caused from a wrong parameter capital or lower-case letter. +
It is recommended to go to the requested Api documentation page and check that the submitted parameters match the relevant example. + +## Correlation request ID + +Each error response contains a unique ID parameter for tracking. +
The property name of this parameter is "target". +
When contacting us about an error, attaching this ID will help find the root cause of the problem. + +## Exapmles + +```json +{ + "error": { + "code": "ResourceNotFound", + "message": "Machine 123123123 was not found", + "target": "43f4cb08-8fac-4b65-9db1-745c2ae65f3a" + } +} +``` +

+ +```json +{ + "error": { + "code": "InvalidRequestBody", + "message": "Request body is incorrect", + "target": "1fa66c0f-18bd-4133-b378-36d76f3a2ba0" + } +} +``` + + diff --git a/windows/security/threat-protection/microsoft-defender-atp/oldTOC.txt b/windows/security/threat-protection/microsoft-defender-atp/oldTOC.txt index 987d3c8ce0..2e2b69385b 100644 --- a/windows/security/threat-protection/microsoft-defender-atp/oldTOC.txt +++ b/windows/security/threat-protection/microsoft-defender-atp/oldTOC.txt @@ -345,6 +345,7 @@ ##### [APIs]() ###### [Supported Microsoft Defender ATP APIs](exposed-apis-list.md) +###### [Common REST API error codes](common-errors.md) ###### [Advanced Hunting](run-advanced-query-api.md) ###### [Alert]()