Defender for Cloud Mend.io Preview integration fails with XSPM HTTP 400 "Invalid request"

Ruben Dupon 0 Reputation points
2026-11-16T13:12:13.97+00:00

We are trying to configure the Mend.io (Preview) integration in Microsoft Defender for Cloud, but connector creation consistently fails with:

Add Mend.io (preview) integration
Invalid request

We have investigated the request in browser DevTools and isolated the failure to the Microsoft MDGW/XSPM backend:

POST https://mgmt-mdgw-prd.securitycenter.windows.com/api/mdgw/XspmConnectors/connectors
HTTP 400 Bad Request
Content-Type: text/plain; charset=utf-8
Invalid request

The connector request contains:

Type: Mendio
Credentials.Type: APIKey
Endpoint: https://api-saas-eu.mend.io/api/v3.0/ 

What we have already validated

  • Defender CSPM is enabled.
  • The required administrative permissions are available.
  • Multiple newly generated Mend Defender for Cloud activation keys produce the same result.
  • The Mend integration service user exists and is active.
  • The service-user email and userKey submitted by Defender match the values in Mend.
  • We independently authenticated to the Mend SaaS-EU API using the exact same integration service user and userKey.
  • Mend authentication succeeds and returns a valid user context and refresh token.
  • Therefore, the Mend service-user credentials themselves are valid.

We also tested the Microsoft XSPM service directly through the requests generated by the Azure portal:

OPTIONS /api/mdgw/XspmConnectors/connectors
→ HTTP 204
GET /api/mdgw/XspmConnectors/connectors/getAllConnectors
→ HTTP 200

The GET response is:

{
 "results": [],
 "recordsCount": 0
}

This confirms that XSPM is reachable/authenticated and that there is no existing or ghost connector registered in the tenant.

Only connector creation fails:

POST /api/mdgw/XspmConnectors/connectors
→ HTTP 400
→ Invalid request

We also performed controlled tests using an invalid Mend userKey, an invalid connector Type, an empty Endpoint, and empty Credentials. XSPM returns the same generic HTTP 400 response for these requests, so the client response does not expose which internal validation is failing.

Questions

  1. Does the current Mend.io Preview integration support Mend organizations hosted on saas-eu.mend.io?
  2. Is https://api-saas-eu.mend.io/api/v3.0/ the expected endpoint for an EU Mend organization?
  3. Are there additional tenant, organization, licensing, Reachability, or XSPM entitlement requirements that aren't documented?
  4. Is there a known issue with creation of Mendio connectors in MDGW/XSPM?
  5. Is there another way to obtain the underlying server-side validation error for /XspmConnectors/connectors?

The POST response contains only Invalid request and does not expose a request ID, correlation ID, traceparent, x-ms-* identifier, or structured error response.

We would appreciate guidance from the Defender for Cloud team, particularly anyone familiar with the MDGW/XSPM Mend.io Preview connector.

We are trying to configure the Mend.io (Preview) integration in Microsoft Defender for Cloud, but connector creation consistently fails with:

Add Mend.io (preview) integration
Invalid request

We have investigated the request in browser DevTools and isolated the failure to the Microsoft MDGW/XSPM backend:

POST https://mgmt-mdgw-prd.securitycenter.windows.com/api/mdgw/XspmConnectors/connectors
HTTP 400 Bad Request
Content-Type: text/plain; charset=utf-8
Invalid request

The connector request contains:

Type: Mendio
Credentials.Type: APIKey
Endpoint: https://api-saas-eu.mend.io/api/v3.0/ 

What we have already validated

  • Defender CSPM is enabled.
  • The required administrative permissions are available.
  • Multiple newly generated Mend Defender for Cloud activation keys produce the same result.
  • The Mend integration service user exists and is active.
  • The service-user email and userKey submitted by Defender match the values in Mend.
  • We independently authenticated to the Mend SaaS-EU API using the exact same integration service user and userKey.
  • Mend authentication succeeds and returns a valid user context and refresh token.
  • Therefore, the Mend service-user credentials themselves are valid.

We also tested the Microsoft XSPM service directly through the requests generated by the Azure portal:

OPTIONS /api/mdgw/XspmConnectors/connectors
→ HTTP 204
GET /api/mdgw/XspmConnectors/connectors/getAllConnectors
→ HTTP 200

The GET response is:

{
 "results": [],
 "recordsCount": 0
}

This confirms that XSPM is reachable/authenticated and that there is no existing or ghost connector registered in the tenant.

Only connector creation fails:

POST /api/mdgw/XspmConnectors/connectors
→ HTTP 400
→ Invalid request

We also performed controlled tests using an invalid Mend userKey, an invalid connector Type, an empty Endpoint, and empty Credentials. XSPM returns the same generic HTTP 400 response for these requests, so the client response does not expose which internal validation is failing.

Questions

  1. Does the current Mend.io Preview integration support Mend organizations hosted on saas-eu.mend.io?
  2. Is https://api-saas-eu.mend.io/api/v3.0/ the expected endpoint for an EU Mend organization?
  3. Are there additional tenant, organization, licensing, Reachability, or XSPM entitlement requirements that aren't documented?
  4. Is there a known issue with creation of Mendio connectors in MDGW/XSPM?
  5. Is there another way to obtain the underlying server-side validation error for /XspmConnectors/connectors?

The POST response contains only Invalid request and does not expose a request ID, correlation ID, traceparent, x-ms-* identifier, or structured error response.

We would appreciate guidance from the Defender for Cloud team, particularly anyone familiar with the MDGW/XSPM Mend.io Preview connector.We are trying to configure the Mend.io (Preview) integration in Microsoft Defender for Cloud, but connector creation consistently fails with:

Add Mend.io (preview) integration
Invalid request

We have investigated the request in browser DevTools and isolated the failure to the Microsoft MDGW/XSPM backend:

POST https://mgmt-mdgw-prd.securitycenter.windows.com/api/mdgw/XspmConnectors/connectors
HTTP 400 Bad Request
Content-Type: text/plain; charset=utf-8
Invalid request

The connector request contains:

Type: Mendio
Credentials.Type: APIKey
Endpoint: https://api-saas-eu.mend.io/api/v3.0/ 

What we have already validated

  • Defender CSPM is enabled.
  • The required administrative permissions are available.
  • Multiple newly generated Mend Defender for Cloud activation keys produce the same result.
  • The Mend integration service user exists and is active.
  • The service-user email and userKey submitted by Defender match the values in Mend.
  • We independently authenticated to the Mend SaaS-EU API using the exact same integration service user and userKey.
  • Mend authentication succeeds and returns a valid user context and refresh token.
  • Therefore, the Mend service-user credentials themselves are valid.

We also tested the Microsoft XSPM service directly through the requests generated by the Azure portal:

OPTIONS /api/mdgw/XspmConnectors/connectors
→ HTTP 204
GET /api/mdgw/XspmConnectors/connectors/getAllConnectors
→ HTTP 200

The GET response is:

{
 "results": [],
 "recordsCount": 0
}

This confirms that XSPM is reachable/authenticated and that there is no existing or ghost connector registered in the tenant.

Only connector creation fails:

POST /api/mdgw/XspmConnectors/connectors
→ HTTP 400
→ Invalid request

We also performed controlled tests using an invalid Mend userKey, an invalid connector Type, an empty Endpoint, and empty Credentials. XSPM returns the same generic HTTP 400 response for these requests, so the client response does not expose which internal validation is failing.

Questions

  1. Does the current Mend.io Preview integration support Mend organizations hosted on saas-eu.mend.io?
  2. Is https://api-saas-eu.mend.io/api/v3.0/ the expected endpoint for an EU Mend organization?
  3. Are there additional tenant, organization, licensing, Reachability, or XSPM entitlement requirements that aren't documented?
  4. Is there a known issue with creation of Mendio connectors in MDGW/XSPM?
  5. Is there another way to obtain the underlying server-side validation error for /XspmConnectors/connectors?

The POST response contains only Invalid request and does not expose a request ID, correlation ID, traceparent, x-ms-* identifier, or structured error response.

We would appreciate guidance from the Defender for Cloud team, particularly anyone familiar with the MDGW/XSPM Mend.io Preview connector.

We are trying to configure the Mend.io (Preview) integration in Microsoft Defender for Cloud, but connector creation consistently fails with:

Add Mend.io (preview) integration
Invalid request

We have investigated the request in browser DevTools and isolated the failure to the Microsoft MDGW/XSPM backend:

POST https://mgmt-mdgw-prd.securitycenter.windows.com/api/mdgw/XspmConnectors/connectors
HTTP 400 Bad Request
Content-Type: text/plain; charset=utf-8
Invalid request

The connector request contains:

Type: Mendio
Credentials.Type: APIKey
Endpoint: https://api-saas-eu.mend.io/api/v3.0/ 

What we have already validated

  • Defender CSPM is enabled.
  • The required administrative permissions are available.
  • Multiple newly generated Mend Defender for Cloud activation keys produce the same result.
  • The Mend integration service user exists and is active.
  • The service-user email and userKey submitted by Defender match the values in Mend.
  • We independently authenticated to the Mend SaaS-EU API using the exact same integration service user and userKey.
  • Mend authentication succeeds and returns a valid user context and refresh token.
  • Therefore, the Mend service-user credentials themselves are valid.

We also tested the Microsoft XSPM service directly through the requests generated by the Azure portal:

OPTIONS /api/mdgw/XspmConnectors/connectors
→ HTTP 204
GET /api/mdgw/XspmConnectors/connectors/getAllConnectors
→ HTTP 200

The GET response is:

{
 "results": [],
 "recordsCount": 0
}

This confirms that XSPM is reachable/authenticated and that there is no existing or ghost connector registered in the tenant.

Only connector creation fails:

POST /api/mdgw/XspmConnectors/connectors
→ HTTP 400
→ Invalid request

We also performed controlled tests using an invalid Mend userKey, an invalid connector Type, an empty Endpoint, and empty Credentials. XSPM returns the same generic HTTP 400 response for these requests, so the client response does not expose which internal validation is failing.

Questions

  1. Does the current Mend.io Preview integration support Mend organizations hosted on saas-eu.mend.io?
  2. Is https://api-saas-eu.mend.io/api/v3.0/ the expected endpoint for an EU Mend organization?
  3. Are there additional tenant, organization, licensing, Reachability, or XSPM entitlement requirements that aren't documented?
  4. Is there a known issue with creation of Mendio connectors in MDGW/XSPM?
  5. Is there another way to obtain the underlying server-side validation error for /XspmConnectors/connectors?

The POST response contains only Invalid request and does not expose a request ID, correlation ID, traceparent, x-ms-* identifier, or structured error response.

We would appreciate guidance from the Defender for Cloud team, particularly anyone familiar with the MDGW/XSPM Mend.io Preview connector.

Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.