﻿# M2M_CLIENT_NOT_FOUND — referenced technical user does not exist

Returned by `/clients` admin endpoints when the supplied `clientId` does not match any registered M2M client in the callers tenant:

<em>cyoda-go version <a href="https://github.com/Cyoda/cyoda-go/releases/tag/v0.8.1">0.8.1</a></em>

# errors.M2M_CLIENT_NOT_FOUND

## NAME

M2M_CLIENT_NOT_FOUND — an admin operation referenced a `clientId` that is not present in this tenant's M2M registry.

## SYNOPSIS

HTTP: `404` `Not Found`. Retryable: `no`.

## DESCRIPTION

Returned by `/clients` admin endpoints when the supplied `clientId` does not match any registered M2M client in the caller's tenant:

- `DELETE /clients/{clientId}` — the deletion target does not exist.
- `PUT /clients/{clientId}/secret` — the rotation target does not exist.

The detail field carries a generic `M2M client not found` message; internal store phrasing is never leaked into the response body.

Not retryable. Verify the `clientId` via `GET /clients` before retrying the operation.

Returned uniformly for `clientId`s that do not exist AND `clientId`s owned by another tenant; the response does not distinguish — by design, to prevent cross-tenant existence enumeration.

## SEE ALSO

- errors
- errors.UNAUTHORIZED
- errors.FORBIDDEN

## See also

- [`cyoda help errors`](/help/errors/) — Every error response from the Cyoda REST API carries a structured `errorCode` in the `properties` object. Multiple codes may share the same HTTP status. Programmatic handling keys on `errorCode`, not HTTP status.
- [`cyoda help errors UNAUTHORIZED`](/help/errors/unauthorized/) — Returned when the `Authorization` header is missing, the bearer token is expired, the token signature is invalid, or the token was issued by an untrusted issuer. Also returned when a request reaches a protected route with no identity context established by the auth middleware.
- [`cyoda help errors FORBIDDEN`](/help/errors/forbidden/) — The request was authenticated successfully but the caller's JWT claims do not include the role required by the endpoint (for example, `admin` is required for administrative operations). Tenant mismatch — where the caller's tenant does not match the resource — also produces this error.

## Raw formats

- [`/help/errors/m2m_client_not_found.json`](/help/errors/m2m_client_not_found.json) — full descriptor (matches `GET /help/{topic}` envelope)
- [`/help/errors/m2m_client_not_found.md`](/help/errors/m2m_client_not_found.md) — body only