-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Setup
This page walks through the prerequisites for the Android Management API integration: Google Cloud project, Android Management API, service account, and enterprise.
- Open Google Cloud Console.
- Create a new project or select an existing one.
- Note the project ID; you’ll use it when creating the enterprise and service account.
- In Cloud Console, go to APIs & Services → Library.
- Search for Android Management API.
- Open it and click Enable for your project.
- Go to APIs & Services → Credentials.
- Click Create Credentials → Service account.
- Give it a name (e.g.
ha-android-management) and optionally a description. - Click Create and Continue. You can skip optional steps (roles, access) unless you need them for other GCP resources.
- Open the new service account → Keys.
- Click Add key → Create new key → JSON, then download the key file.
Keep this file secure; it is the credential the integration will use.
The Android Management API uses the same identity for both API access and “signup” (enterprise creation). The service account does not need special IAM roles in Google Cloud for normal API use; access is controlled by the enterprises and policies you create.
To create an enterprise (first-time setup only):
- Use either:
- A user account (not the service account) that has completed the Android Management API signup flow, or
- The same service account after it has been used to sign up for the API (e.g. by creating an enterprise once via the API or the console).
After at least one enterprise exists, the service account only needs to be allowed to access that enterprise (see Android Management / Admin console, not GCP IAM).
You need at least one enterprise in Android Management. Its resource name (e.g. enterprises/LC00t1kz5a) is what you enter in the integration as Enterprise Name.
Option A – Using Google’s Admin console
- Go to Android Management API – Sign up and complete signup with your Google account (or the one that will own the enterprise).
- Use the Android Management console to create and manage enterprises and policies.
The enterprise resource name is shown in the console (e.g. in URL or settings). It looks likeenterprises/LC00t1kz5a.
Option B – Using the API
- If you use the API or a script to create enterprises, use the same project and ensure the identity (user or service account) has completed signup and has permission to create enterprises.
Once you have the enterprise name (e.g. enterprises/LC00t1kz5a), you can add the integration in Home Assistant and paste or point to the service account JSON key.
- In the Android Management console, ensure the service account’s email (e.g.
ha-android-management@your-project.iam.gserviceaccount.com) is allowed to manage the enterprise, if your setup requires explicit access control. - If you created the enterprise with the same Google account that owns the project, the project’s service account is often already able to manage that enterprise; if you see permission errors, add the service account in the Android Management / Admin console.
- Google Cloud project created or selected
- Android Management API enabled for that project
- Service account created and JSON key downloaded
- At least one enterprise created; enterprise name (e.g.
enterprises/LC00t1kz5a) known - Service account has access to that enterprise (if required by your setup)
Next: add the integration in Home Assistant and enter the Enterprise Name and service account credentials. See Configuration.