# rpc error: code = Unauthenticated desc = missing credentials

- **ID:** `go/grpc-unauthenticated-missing-credentials`
- **Domain:** go
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The client did not provide any authentication credentials in the request metadata.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.56.x | active | — | — |
| 1.57.x | active | — | — |

## Workarounds

1. **** (100% success)
   ```
   md := metadata.Pairs("authorization", "Bearer mytoken"); ctx := metadata.NewOutgoingContext(context.Background(), md)
   ```
2. **** (90% success)
   ```
   creds := credentials.NewClientTLSFromCert(nil, ""); conn, err := grpc.Dial(address, grpc.WithTransportCredentials(creds))
   ```
3. **** (85% success)
   ```
   interceptor := func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer mytoken"); return invoker(ctx, method, req, reply, cc, opts...) }
   ```

## Dead Ends

- **Sending an empty token or user/pass.** — Server still sees no valid credentials. (90% fail)
- **Removing auth checks.** — Security risk. (80% fail)
- **Not adding any metadata.** — Same error will occur. (100% fail)
