<br />

For a list of [methods](https://developers.google.com/android/work/play/emm-api/v1/serviceaccountkeys#methods) for this resource, see the end of this page.

## Resource representations

<br />

**Deprecated:** New integrations cannot use this method and can refer to our [new recommendations](https://developers.google.com/android/work/deprecations#recommended_alternative_6)  
**This method will no longer be accessible by anyone after September 30, 2025.** Credentials that can be used to authenticate as a service account.

<br />

```
{
  "kind": "androidenterprise#serviceAccountKey",
  "id": string,
  "type": string,
  "data": string,
  "publicData": string
}
```

| Property name | Value | Description | Notes |
|---|---|---|---|
| `data` | `string` | The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google. When `type` is "`pkcs12`", the contents of the `data` field is base64 encoded and has the password "`notasecret`". |   |
| `id` | `string` | An opaque, unique identifier for this ServiceAccountKey. Assigned by the server. |   |
| `kind` | `string` |   |   |
| `publicData` | `string` | Public key data for the credentials file. This is an X.509 cert. If you are using the `googleCredentials` key type, this is identical to the cert that can be retrieved by using the X.509 cert url inside of the credentials file. |   |
| `type` | `string` | The file format of the generated key data. <br /> Acceptable values are: - "`googleCredentials`" - "`pkcs12`" |   |

## Methods

[delete](https://developers.google.com/android/work/play/emm-api/v1/serviceaccountkeys/delete)
:   **Deprecated:** New integrations cannot use this method and can refer to our [new
    recommendations](https://developers.google.com/android/work/deprecations#recommended_alternative_4).  
    **This method will no longer be accessible by
    anyone after September 30, 2025.**
    Removes and invalidates the specified credentials for the service account
    associated with this enterprise. The calling service account must have been
    retrieved by calling Enterprises.GetServiceAccount and must have been set
    as the enterprise service account by calling Enterprises.SetAccount.

[insert](https://developers.google.com/android/work/play/emm-api/v1/serviceaccountkeys/insert)
:   **Deprecated:** New integrations cannot use this method and can refer to our [new
    recommendations](https://developers.google.com/android/work/deprecations#recommended_alternative_4).  
    **This method will no longer be accessible by
    anyone after September 30, 2025.**
    Generates new credentials for the service account associated with this
    enterprise. The calling service account must have been retrieved by calling
    Enterprises.GetServiceAccount and must have been set as the enterprise
    service account by calling Enterprises.SetAccount.   


    Only the type of the key should be populated in the resource to be
    inserted.

[list](https://developers.google.com/android/work/play/emm-api/v1/serviceaccountkeys/list)
:   **Deprecated:** New integrations cannot use this method and can refer to our [new
    recommendations](https://developers.google.com/android/work/deprecations#recommended_alternative_4).  
    **This method will no longer be accessible by
    anyone after September 30, 2025.**
    Lists all active credentials for the service account associated with this
    enterprise. Only the ID and key type are returned. The calling service
    account must have been retrieved by calling Enterprises.GetServiceAccount
    and must have been set as the enterprise service account by calling
    Enterprises.SetAccount.