Method: projects.serviceAccounts.list

Lists ServiceAccounts for a project.

HTTP request

GET https://iam.googleapis.com/v1/{name=projects/*}/serviceAccounts

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.

Authorization requires the following Google IAM permission on the specified resource name:

  • iam.serviceAccounts.list

Query parameters

Parameters
pageSize

number

Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request.

pageToken

string

Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

The service account list response.

JSON representation
{
  "accounts": [
    {
      object(ServiceAccount)
    }
  ],
  "nextPageToken": string
}
Fields
accounts[]

object(ServiceAccount)

The list of matching service accounts.

nextPageToken

string

To retrieve the next page of results, set ListServiceAccountsRequest.page_token to this value.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/iam
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Identity and Access Management