An Azure service that provides a hybrid, multi-cloud management platform for APIs.
A 200 OK with an empty body while the backend is never contacted most directly matches an effective APIM policy that lacks forward-request; restore backend-policy inheritance or add forward-request explicitly on onHandshake.
Check and restore the effective backend policy
APIM requires forward-request to dispatch a request to the configured backend. If it is absent, APIM completes inbound processing and returns an empty 200 without contacting the backend—the exact behavior described here.^1^ ^2^
- In Azure portal, open API Management → APIs → your WebSocket API → Design → onHandshake.
- Open the policy code editor and select Calculate effective policy.
- Inspect the effective
<backend>section. It must ultimately contain:<backend> <forward-request /> </backend> - If it is missing, determine where inheritance was broken:
- Operation scope:
onHandshake - API scope: WebSocket API → All operations
- Product scope: only if the API belongs to a product
- Global scope: APIs → All APIs
<base />is present. By default,forward-requestis defined globally and narrower scopes contain<base />.^3^ - Operation scope:
- Use this minimal operation-level policy to restore normal inheritance:
<policies> <inbound> <base /> </inbound> <backend> <base /> </backend> <outbound> <base /> </outbound> <on-error> <base /> </on-error> </policies> - Save, recalculate the effective policy, and verify that its backend section now resolves to
forward-request. Then repeat the handshake; the backend should be contacted and, if it upgrades successfully, APIM should return101 Switching Protocols.
Removing the explicit onHandshake policy does not necessarily restore forwarding if inheritance is broken at API or global scope. Checking the effective policy distinguishes that case.
Tier and platform behavior
There is no documented additional setting or Developer-tier limitation for this operation. The WebSocket API feature explicitly applies to Developer, Basic, Basic v2, Standard, Standard v2, Premium, and Premium v2; only Consumption is listed as unsupported.^4^
The documented passthrough sequence is:
- APIM receives the handshake through
onHandshake. - APIM applies policies and sends the handshake to the backend.
- The backend upgrades the connection.
- APIM upgrades the client connection.
Therefore, an empty 200 without a backend attempt is not successful WebSocket passthrough.^4^
If forward-request is present
Since direct backend testing, API recreation, Origin variations, and multiple clients are already ruled out, collect gateway evidence rather than repeating those tests:
- Open APIM → Monitoring → Diagnostic settings → Add diagnostic setting.
- Enable:
- Logs related to ApiManagement Gateway
- WebSocket connections
- Send them to a Log Analytics workspace using resource-specific tables.^5^
- Reproduce once, then correlate:
-
ApiManagementGatewayLogs -
ApiManagementWebSocketConnectionLogs
CorrelationId,EventName,Source,Destination, andError.^6^ -
If the effective policy contains forward-request but the logs show no backend dispatch or WebSocket connection event, open an Azure support request as a probable instance/gateway defect. Include:
- APIM resource, Denmark East, Developer tier, and
platformVersion: stv2.1 - UTC timestamp and WebSocket
CorrelationId - Sanitized request and empty
200response - Calculated effective policy showing
forward-request - Gateway and WebSocket connection log records
- Direct-backend
101evidence - Confirmation that the failure occurs both with and without
Origin
The linked Key Vault question concerns App Service Key Vault-reference authorization and has no accepted resolution; it does not establish a relationship to this APIM handshake behavior.
References