Method: projects.serviceAccounts.list

Lists everyServiceAccount that belongs to a specific project.

HTTP request

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

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
name

string

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

Authorization requires the followingIAM permission on the specified resourcename:

  • iam.serviceAccounts.list

Query parameters

Parameters
pageSize

integer

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

The default is 20, and the maximum is 100.

pageToken

string

Optional pagination token returned in an earlierListServiceAccountsResponse.next_page_token.

Request body

The request body must be empty.

Response body

The service account list response.

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

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, setListServiceAccountsRequest.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 theAuthentication Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-21 UTC.