How to View Linked Billing Accounts
Understanding which billing account is linked to each Google Cloud project is essential for cost management, budget planning, and organizational structure. This guide shows you how to view billing account associations using the Console, gcloud CLI, and BigQuery exports.
Prerequisites
Before you begin, ensure you have:
- Billing Account Viewer role (minimum) on the billing account
- Viewer role on projects you want to inspect
- Access to the Google Cloud Console or gcloud CLI installed
- At least one Google Cloud project with billing enabled
Understanding Billing Account Links
What is a Billing Account Link?
A billing account link is the association between a Google Cloud project and a Cloud Billing account. Every project that creates billable resources must be linked to an active billing account.
Key concepts:
- One-to-many relationship: One billing account can be linked to multiple projects
- One-to-one per project: Each project can only be linked to one billing account at a time
- Unlinked projects: Projects without a linked billing account cannot create billable resources
- Billing account types: Self-serve (credit card) or invoiced (enterprise)
Why View Billing Account Links?
Common reasons to check billing associations:
- Cost allocation: Understand which projects are billed to which account
- Budget planning: Group projects by billing account for financial reporting
- Troubleshooting: Diagnose why a project can't create resources
- Compliance: Verify projects are billed to the correct department or cost center
- Organization restructuring: Plan migrations between billing accounts
Step-by-Step Guide
Method 1: Using Google Cloud Console
View All Projects for a Billing Account
-
Navigate to Billing
- Open the Google Cloud Console
- Click the navigation menu (three horizontal lines)
- Select Billing
-
Select Billing Account
- If you have multiple billing accounts, choose the one you want to inspect
- The billing account ID appears at the top (format:
ABCDEF-123456-ABCDEF)
-
View Linked Projects
- In the left sidebar, click Account management
- The main panel shows all projects linked to this billing account
- You'll see:
- Project name - Display name of the project
- Project ID - Unique project identifier
- Billing status - Active or billing disabled
- Labels - Project labels for organization
-
Filter and Search
- Use the search box to find specific projects
- Click column headers to sort by name, ID, or status
- Use filters to show only active or disabled projects
View Billing Account for a Specific Project
-
Navigate to the Project
- Go to Google Cloud Console
- Select your project from the project dropdown at the top
-
Open Billing Settings
- Click Navigation menu > Billing
- You'll see "This project is linked to billing account: [ACCOUNT_NAME]"
- The billing account ID and name are displayed
-
View Billing Details
- Click Go to linked billing account to see full billing details
- View payment methods, budgets, and cost reports
Method 2: Using gcloud CLI
List All Billing Accounts
# View all billing accounts you have access to
gcloud billing accounts list
Example output:
ACCOUNT_ID NAME OPEN MASTER_ACCOUNT_ID
012345-ABCDEF-678901 My Company Billing True
FEDCBA-987654-FEDCBA Dev Team Billing True
List Projects Linked to a Billing Account
# View all projects linked to a specific billing account
gcloud billing accounts list --format="value(name)"
# Then for each billing account:
gcloud billing projects list \
--billing-account=BILLING_ACCOUNT_ID \
--format="table(projectId, name, billingEnabled)"
Example:
gcloud billing projects list \
--billing-account=012345-ABCDEF-678901 \
--format="table(projectId, name, billingEnabled)"
Example output:
PROJECT_ID NAME BILLING_ENABLED
my-production-project Production True
my-dev-project Development True
my-staging-project Staging Environment True
Check Billing Account for a Specific Project
# Get the billing account linked to a project
gcloud billing projects describe PROJECT_ID \
--format="value(billingAccountName, billingEnabled)"
Example:
gcloud billing projects describe my-production-project \
--format="value(billingAccountName, billingEnabled)"
Example output:
billingAccounts/012345-ABCDEF-678901
True
View Projects Without Billing
# Find projects with billing disabled
gcloud projects list \
--format="table(projectId, name, projectNumber)" \
--filter="lifecycleState:ACTIVE"
# Then check each project's billing status
for project in $(gcloud projects list --format="value(projectId)"); do
billing_enabled=$(gcloud billing projects describe $project --format="value(billingEnabled)" 2>/dev/null)
if [ "$billing_enabled" != "True" ]; then
echo "$project: Billing Disabled"
fi
done
Method 3: Using BigQuery (For Large Organizations)
If you have billing exports enabled, you can query project-billing associations:
-- List all projects and their billing accounts from billing exports
SELECT
DISTINCT
billing_account_id,
project.id AS project_id,
project.name AS project_name,
COUNT(DISTINCT DATE(usage_start_time)) AS active_days_last_30
FROM
`PROJECT_ID.DATASET_NAME.gcp_billing_export_v1_*`
WHERE
_TABLE_SUFFIX >= FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
GROUP BY
billing_account_id,
project_id,
project_name
ORDER BY
billing_account_id,
project_name
This query shows:
- All billing accounts
- All projects that incurred costs in the last 30 days
- How many days each project had billable usage
Method 4: Using Cloud Asset Inventory API
For programmatic access across an organization:
# List all projects in organization with billing info
gcloud asset search-all-resources \
--scope=organizations/ORG_ID \
--asset-types="cloudresourcemanager.googleapis.com/Project" \
--format="table(name, additionalAttributes.billingAccountId)"
Common Scenarios
Scenario 1: Audit All Project-Billing Associations
Goal: Generate a complete report of which projects are linked to which billing accounts
Solution:
# Export to CSV
echo "Project ID,Project Name,Billing Account,Billing Enabled" > billing_audit.csv
for account in $(gcloud billing accounts list --format="value(name)"); do
gcloud billing projects list \
--billing-account=$account \
--format="csv[no-heading](projectId,name,billingAccountName,billingEnabled)" \
>> billing_audit.csv
done
echo "Report saved to billing_audit.csv"
Scenario 2: Find Projects Without Billing
Goal: Identify projects that cannot create billable resources
Solution:
# List projects without billing enabled
gcloud projects list --format="value(projectId)" | while read project; do
enabled=$(gcloud billing projects describe $project --format="value(billingEnabled)" 2>/dev/null)
if [ "$enabled" != "True" ]; then
echo "No billing: $project"
fi
done
Scenario 3: Verify Project Billing Before Migration
Goal: Check billing account before moving workloads
Solution:
# Check billing account for a project
PROJECT_ID="my-project"
BILLING_ACCOUNT=$(gcloud billing projects describe $PROJECT_ID \
--format="value(billingAccountName)")
echo "Project: $PROJECT_ID"
echo "Billing Account: $BILLING_ACCOUNT"
# Check if billing account is active
gcloud billing accounts describe $BILLING_ACCOUNT \
--format="table(displayName, open, masterBillingAccount)"
Understanding Billing Account Hierarchy
Master Billing Accounts (Resellers)
Some organizations use master billing accounts (for resellers or managed service providers):
# Check if a billing account has a master account
gcloud billing accounts describe BILLING_ACCOUNT_ID \
--format="value(masterBillingAccount)"
If output is not empty, this is a sub-account managed by a reseller.
Organization-Level View
For enterprise organizations with folders:
# View all projects in organization with billing
gcloud projects list \
--organization=ORG_ID \
--format="table(projectId, name, parent.id, parent.type)"
Best Practices
Access Control
- Grant least privilege: Use Billing Account Viewer role for read-only access
- Audit regularly: Review who has access to billing accounts quarterly
- Use groups: Assign permissions to groups, not individual users
- Separate duties: Billing administrators should be different from project owners
Organization
- Standardize naming: Use consistent naming for billing accounts and projects
- Use labels: Tag projects with cost center, team, or department labels
- Document structure: Maintain a registry of project-to-billing-account mappings
- Automate audits: Schedule weekly/monthly billing association reports
Cost Management
- Group by cost center: Link related projects to the same billing account
- Enable billing exports: Export all billing accounts to BigQuery for unified reporting
- Set budgets: Configure budget alerts per billing account
- Monitor unlinked projects: Identify and resolve projects without billing
Compliance
- Verify associations: Ensure projects are billed to correct departments
- Track changes: Enable Cloud Audit Logs for billing account modifications
- Review periodically: Quarterly review of project-billing associations
- Document policies: Maintain written policies for billing account assignments
Troubleshooting
Cannot See Billing Account
Problem: Billing account doesn't appear in the Console
Solution:
- Verify you have Billing Account Viewer role or higher
- Check that you're signed in with the correct Google account
- Confirm the billing account is active:
gcloud billing accounts list - Request access from your organization's billing administrator
Project Shows No Billing Account
Problem: Project exists but shows no linked billing account
Solution:
- Project may have never had billing enabled
- Billing may have been disabled due to payment issues
- Check billing status:
gcloud billing projects describe PROJECT_ID - Link billing account: Console > Billing > Link a billing account
Permission Denied Error
Problem: "Permission denied" when trying to view billing info
Solution:
- You need Billing Account Viewer role at minimum
- For gcloud: Ensure you're authenticated:
gcloud auth list - Request appropriate IAM roles from your organization admin
- Verify project exists:
gcloud projects describe PROJECT_ID
Billing Account Shows No Projects
Problem: Billing account has no linked projects displayed
Solution:
- All projects may have been unlinked or deleted
- You may not have Project Viewer role on those projects
- Check with:
gcloud billing projects list --billing-account=ACCOUNT_ID - Verify billing account is active and not suspended
CLI Command Fails
Problem: gcloud command returns empty or errors
Solution:
# Check authentication
gcloud auth list
# Set the correct project
gcloud config set project PROJECT_ID
# Update gcloud components
gcloud components update
# Re-authenticate if needed
gcloud auth login
Next Steps
After viewing your billing account links:
- Enable billing exports: Export cost data to BigQuery for analysis
- Set up budgets: Configure budget alerts per billing account
- Implement labels: Tag projects for better cost attribution
- Automate reporting: Create scheduled queries for billing association reports
- Review access: Audit who has access to each billing account
- Document structure: Create an inventory of your project-billing architecture
Related Resources
Frequently Asked Questions
Find answers to common questions
Need Professional Help?
Our team of experts can help you implement and configure these solutions for your organization.