As an alternative, you can use the - wildcard character instead of the project ID:
projects/-/serviceAccounts/{EMAIL_ADDRESS}
projects/-/serviceAccounts/{UNIQUE_ID}
When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not
Found error.
Authorization requires the following IAM permission on the specified resource name:
Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.
Request body
The request body must be empty.
Response body
The service account keys list response.
If successful, the response body contains data with the following structure:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-07 UTC."],[[["This document describes how to list all `ServiceAccountKey` resources for a given service account using an HTTP GET request to the specified URL endpoint."],["The request requires a `name` path parameter, which is a string representing the resource name of the service account, with specific formats detailed for project ID and email address or unique ID, and it can also use a wildcard, with caveats."],["An optional `keyTypes[]` query parameter allows filtering the types of keys included in the response, with duplicate key types not allowed and all keys being returned if none are specified."],["The request body must be empty, and a successful response includes a JSON representation with a list of `keys`, each of which contains details about a public key for the service account."],["Access to this functionality requires specific OAuth scopes, either `https://www.googleapis.com/auth/iam` or `https://www.googleapis.com/auth/cloud-platform`, and also requires `iam.serviceAccountKeys.list` IAM permission on the specified resource."]]],[]]