Google AI Studio Remix – Firebase integration enabled but Firestore Admin SDK returns PERMISSION_DENIED

Hello Google AI Studio Support Team,

I am developing an English learning management application using Google AI Studio Build Mode.

My application uses Firebase Firestore & Authentication, and the integration is shown as Enabled.

I have verified that:

  1. The Google Cloud Project ID is correct.

  2. The Firestore Database ID matches the AI Studio Remix application.

  3. Firebase Admin SDK uses Application Default Credentials (ADC).

  4. The runtime credentials identify an AI Studio-managed sandbox service account belonging to a different infrastructure project.

  5. The expected sandbox service account is not visible in my application’s project IAM.

  6. A read-only Firestore connection test fails with:

7 PERMISSION_DENIED: Missing or insufficient permissions.

The integration configuration appears correct, but the backend cannot read the Firestore database.

I have not modified IAM permissions, Firebase Security Rules, or database settings.

Could the Google AI Studio team please investigate the managed service account provisioning and restore the required Firestore access?

I need to preserve my existing application, database configuration, and student data.

I would also like to remain on the free tier without enabling billing.

Please advise on the safest supported recovery procedure.

I can provide the Project ID, Database ID, application ID, and relevant diagnostic information privately if required.

Thank you.

Hiya, amigo. Well, that “PERMISSION_DENIED” error kinda confirms it: the runtime identity lacks read/write rights over your Cloud Firestore resource.

In Google AI Studio Build Mode, the sandbox backend runs under a Google-managed infrastructure service account rather than your project’s default “App Engine/Compute” service account. If the automated link failed or permissions were reset, I’d try:

a. Checking the exact email of the service account logging the error in your sandbox runtime (it usually ends in gserviceaccount.com)

b. Going to “Google Cloud Console > IAM & Admin > IAM” in your application’s project.

c. Clicking Grant Access and add that service account email as a principal.

d. Assigning it the Cloud Datastore User (roles/datastore.user) or Firebase Admin SDK Administrator Service Agent role.

This cross-project IAM grant will keep the database, student’s data, and Free Tier untouched without requiring paid billing =)

Hi gershu,

Thank you very much for your helpful response!

I have performed some additional diagnostics.

My Google AI Studio sandbox runtime is currently using a Google-managed service account from a different infrastructure project.

Both official Firestore management API requests return:

HTTP 403 PERMISSION_DENIED

Therefore, I still cannot confirm whether the target Firestore database actually exists.

Before manually granting IAM permissions, I would like to clarify a few points:

  1. Is this cross-project sandbox service account the expected runtime identity for Google AI Studio Build Mode?

  2. Should Google AI Studio automatically provision the required IAM permissions when Firebase integration is enabled?

  3. Is manually granting Cloud Datastore User to this infrastructure service account an officially supported and safe solution?

  4. Could the Google AI Studio team verify whether the Firebase integration was provisioned correctly and restore the required permissions?

  5. Would re-running Firebase provisioning risk creating a new database or modifying the existing Firebase configuration?

My application contains student information and learning results. I need to preserve the existing application, database configuration, and student data.

I would also like to remain on the free tier without enabling billing.

I can provide the Project ID, Database ID, and service account details privately to an authorized Google support representative.

Any guidance from the Google AI Studio team would be greatly appreciated.

Thank you again!

Hi, Thank you for reporting this. We are looking into this issue. Could you please share your Google Cloud Project ID, Firestore Database ID, and AI Studio Applet ID via direct message?

Hi Payal,

Thank you for your response!

I’d be happy to share the requested details privately. However, I can’t find the “Message” button on your profile.

Could you please send me a direct message first, or help me enable private messaging on my account?

Thank you so much!

I have DM`ed for more details .