---
title: "The Cloud SQL Admin API is disabled for a Cloud Run connection | Proofline"
description: "When Cloud Run's Cloud SQL connection reports Error 403: Access Not Configured, check that sqladmin.googleapis.com is enabled in each project involved."
url: https://proofline.sh/learn/cloud-sql-admin-api-disabled-cloud-run/
---

[Learning center](/learn/)

# The Cloud SQL Admin API is disabled for a Cloud Run connection

When Cloud Run's Cloud SQL connection reports Error 403: Access Not Configured, check that sqladmin.googleapis.com is enabled in each project involved. That is the project the service connects from, and the instance's project if it is a different one. The Service Usage audit log says who disabled it and when. Services that connect by TCP to the private IP keep working, because no proxy or connector on their path calls the API.

Permission errors The Proofline team November 23, 2026 5 min read

## Why the API is on the path

The Cloud SQL Auth Proxy, which Cloud Run embeds for its built-in connection, calls the Cloud SQL Admin API to obtain an ephemeral certificate before it connects, and the Admin API must be enabled to use it. The language connectors call the same API through `sqladmin.googleapis.com`. [About the Auth Proxy](https://cloud.google.com/sql/docs/postgres/sql-proxy#how-works) · [Auth Proxy requirements](https://cloud.google.com/sql/docs/postgres/sql-proxy#requirements)

Cloud SQL's Cloud Run guide asks for the API in the project you connect from. When the service account belongs to a different project than the instance, it must be enabled in both. [Connect from Cloud Run](https://cloud.google.com/sql/docs/postgres/connect-run#setup-sql) · [Public IP setup](https://cloud.google.com/sql/docs/postgres/connect-run#public-ip-default)

The Auth Proxy troubleshooting guide prints the symptom: with the API disabled, the proxy logs show output like `Error 403: Access Not Configured`. [Auth Proxy troubleshooting](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy#troubleshooting) That is a refusal at stage 2 of [the four stages](/learn/cloud-run-cloud-sql-connection-errors/#stage), next to a missing Cloud SQL Client role, which returns `403 notAuthorized` instead. [The service account lacks Cloud SQL Client](/learn/cloud-run-cloud-sql-client-role-missing/)

The direct private IP path uses TCP to the instance without the Auth Proxy. [Connect with TCP](https://cloud.google.com/sql/docs/postgres/connect-run#private-ip_1) Nothing on that path calls the Admin API to connect, so a disabled API leaves it working. A language connector set to the private IP type still calls the API.

## Check 1: which projects need it?

Two projects can matter: the project that holds the Cloud Run service, and the project that holds the instance, the first part of the connection name `PROJECT:REGION:INSTANCE`.

```
gcloud run revisions describe REVISION --project PROJECT --region REGION \
  --format='yaml(metadata.annotations, spec.serviceAccountName)'
```

The `run.googleapis.com/cloudsql-instances` annotation gives the connection names, and the service account's email shows its home project. [Revision template annotations](https://cloud.google.com/run/docs/reference/rest/v1/RevisionTemplate) When the instance or the account is elsewhere, see [an instance in another project](/learn/cloud-run-cloud-sql-other-project/) for the other settings that go with it.

## Check 2: is it enabled now?

```
for p in SERVICE_PROJECT INSTANCE_PROJECT; do
  echo "== $p"
  gcloud services list --enabled --project "$p" | grep sqladmin.googleapis.com
done
```

`gcloud services list --enabled` lists the services a project has enabled. [`gcloud services list`](https://cloud.google.com/sdk/gcloud/reference/services/list) An empty result under a project means the API is not enabled there.

| Service project | Instance project | Reading |
| --- | --- | --- |
| Enabled | Enabled | The API is not the cause. Read the role, the connection name and the quota |
| Disabled | Any | The proxy in the service's project cannot call the API. Find when it was disabled |
| Enabled | Disabled, and the projects differ | The cross-project requirement is not met. Find when it was disabled |

Enabling the API is a change to the project: `gcloud services enable sqladmin.googleapis.com --project PROJECT`. It needs `serviceusage.services.enable`, for example through the Service Usage Admin role. [Enable the API](https://cloud.google.com/sql/docs/postgres/connect-run#setup-sql)

## Check 3: who disabled it, and when?

Enabling and disabling services are Admin Activity audit events from Service Usage, with the methods `google.api.serviceusage.v1.ServiceUsage.EnableService`, `DisableService` and `BatchEnableServices`. [Service Usage audit logging](https://cloud.google.com/service-usage/docs/audit-logging) Admin Activity logs cannot be disabled. [Understanding audit logs](https://cloud.google.com/logging/docs/audit/understanding-audit-logs)

```
gcloud logging read \
  'protoPayload.serviceName="serviceusage.googleapis.com"
   AND protoPayload.methodName:"DisableService"
   AND timestamp>="START_TIME"' \
  --project PROJECT --order=asc \
  --format='value(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.resourceName)'
```

| Audit log | Reading |
| --- | --- |
| A `DisableService` for `sqladmin.googleapis.com` in the window | Disabled then. The caller tells you which person or automation did it, and that process will do it again unless it changes |
| None in the window, and the API is disabled | It was never enabled in this project. Something else connected before: another project, another path or another service |

Then compare the time with the first failure. Instances already running keep their proxy connections, so failures start when new instances start or when existing connections need a new certificate, which the proxy refreshes before the roughly one-hour expiry. [How the Auth Proxy works](https://cloud.google.com/sql/docs/postgres/sql-proxy#how-works)

## A worked fixture: which service still works

The fixture is illustrative. In the fictional project `shop-prod`, `orders-api` connects to `shop-prod:europe-west1:orders-db` through the built-in socket. A second service, `stock-api`, connects to the same instance by TCP on its private address `10.40.0.3` through Direct VPC egress.

Outcome A: disabled by an automation.

| Time (UTC) | Source | Entry |
| --- | --- | --- |
| 08:50:12 | Service Usage audit log | `DisableService` on `sqladmin.googleapis.com`, caller `infra-apply@shop-prod.iam.gserviceaccount.com` |
| 09:12:41 | `orders-api-00018` | Proxy output with `Error 403: Access Not Configured` |
| 09:14:05 | `orders-api-00017`, fresh instance via tag `prev` | Same error |
| 09:14:30 | `stock-api` | No database errors |

`stock-api` is unaffected because its path does not use the API, and both revisions of `orders-api` fail. The 09:12 deploy only started the first new instances after the change; a rollback will not help. An infrastructure change removed the API from the project. Enabling it restores connections; fix the code that removed it too.

**Outcome B: a second project.** The same service moves to a new instance `shop-data:europe-west1:orders-db` in the project `shop-data`, with `orders-runtime` granted Cloud SQL Client there. `orders-api-00018`, deployed at 09:12:30 with the new connection name, fails with `Error 403: Access Not Configured`. `sqladmin.googleapis.com` is enabled in `shop-prod` and absent in `shop-data`, and no `DisableService` appears there: it was never enabled. The new instance's project needs the API as well.

## Where the checks mislead

A `429` with `rateLimitExceeded` from `sqladmin.googleapis.com` also comes from the Admin API, and it means a quota, not a disabled API. Cloud Run's use of the API grows with the number of instances: roughly twice the number of connected Cloud SQL instances times the number of Cloud Run instances. [Auth Proxy troubleshooting](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy#troubleshooting) · [API quota limits](https://cloud.google.com/sql/docs/postgres/connect-run#api-quota-limits)

A service that keeps working is evidence about its own path only. `stock-api` working says nothing about the API; it never needed it.

## Questions

### Does Cloud Run need the Cloud SQL Admin API to connect to Cloud SQL?

For the built-in Cloud SQL connection and the language connectors, yes: the Auth Proxy and the connectors call it to get certificates. A direct TCP connection to the instance's private IP does not go through them.

### In which project must the Cloud SQL Admin API be enabled?

In the project you connect from. When the instance and the service account are in different projects, enable it in both.

### How do I find out who disabled the Cloud SQL Admin API?

Read the project's Admin Activity audit log for Service Usage `DisableService` entries. Each one names the caller and the time.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Cloud Run and a Cloud SQL instance in another project](/learn/cloud-run-cloud-sql-other-project/)
    
    Permission errors The Proofline team November 23, 2026 5 min read
    
-   ### [The Cloud Run service account lacks Cloud SQL Client: who removed it?](/learn/cloud-run-cloud-sql-client-role-missing/)
    
    Permission errors The Proofline team November 23, 2026 5 min read
