## TL;DR
`billing.accounts.get` is a billing-account-level permission, and your identity does not hold it there. Grant `roles/billing.viewer` on the billing account (not on a project), then retry the gcloud command.

```text
ERROR: (gcloud.billing.accounts.list) The caller does not have permission: billing.accounts.get
```

## Use this when
- `gcloud billing accounts list` or `gcloud billing projects link` is permission-denied.
- You can run other gcloud commands fine but billing ones fail.
- A script that manages billing account links breaks with this error.

## Not for this skill when
- The command succeeds but returns empty. That can be a different permission shape.
- Budget creation fails. That needs the costs manager role.

## Steps
1. Find your billing account ID: ask an admin or check the billing section of the console. Verify: you have the ID in the form [billing account id].
2. Have a billing admin grant your identity `roles/billing.viewer` on that billing account's IAM page. Verify: the grant is on the billing account, not a project.
3. Re-run the gcloud command. Verify: it returns data instead of the permission error.
4. If you need to link projects or manage budgets, viewer is not enough; request `roles/billing.user` or `roles/billing.costsManager` respectively. Verify: the new command set works.
5. For automation, grant the role to the service account the script uses, not to your user. Verify: the script runs clean.

### Empty list variant
If the command succeeds but lists nothing, you may have viewer on one account while the projects sit on another. Verify: you are looking at the right billing account ID.

Compatibility: Google Cloud SDK, all billing account types.

## Why it happens
Billing accounts sit outside the project hierarchy, and their IAM is separate. Project owners routinely have zero billing permissions, so billing commands fail until someone grants a role at the billing account level.

## Edge cases / pitfalls
- There is no self-service way to discover billing account IDs without the permission. You need an admin's help for step one.
- Role changes can take a few minutes to propagate. Wait before retesting.
- Service accounts used by billing export or FinOps tooling need the same grant.
- Do not hand out billing admin to fix a viewer problem. Match the role to the action.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_kpHEdtbV8TTnhk1rLdFbAQ
