Method: projects.serviceAccounts.list

Lists every ServiceAccount that belongs to a specific project.

HTTP request

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

The URL uses gRPC Transcoding 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 IAM permission on the specified resource name :

  • 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 the ListServiceAccountsResponse.next_page_token in a subsequent request.

The default is 20, and the maximum is 100.

pageToken

string

Optional pagination token returned in an earlier ListServiceAccountsResponse.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, 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 .

Create a Mobile Website
View Site in Mobile | Classic
Share by: