Stay organized with collections
Save and categorize content based on your preferences.
Returns a service account and credentials. The service account
can be bound to the enterprise by calling setAccount. The service account
is unique to this enterprise and EMM, and will be deleted if the enterprise
is unbound. The credentials contain private key data and are not stored
server-side.
This method can only be called after calling
Enterprises.Enroll or Enterprises.CompleteSignup, and before
Enterprises.SetAccount; at other times it will return an error.
Subsequent calls after the first will generate a new, unique set of
credentials, and invalidate the previously generated credentials.
Once the service account is bound to the enterprise, it can be managed
using the serviceAccountKeys resource.
.
Request
HTTP request
GET https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/serviceAccount
Parameters
Parameter name
Value
Description
Path parameters
enterpriseId
string
The ID of the enterprise.
Optional query parameters
keyType
string
The type of credential to return with the service account. Required.
Acceptable values are:
"googleCredentials"
"pkcs12"
Authorization
This request requires authorization with the following scope:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-26 UTC."],[[["\u003cp\u003eGenerates a service account and credentials that are unique to the enterprise and EMM and can be used for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThe service account can be bound to the enterprise using the \u003ccode\u003esetAccount\u003c/code\u003e call and managed with the \u003ccode\u003eserviceAccountKeys\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eRequires prior enrollment or signup completion and executing this method invalidates previously generated credentials, issuing new ones.\u003c/p\u003e\n"],["\u003cp\u003eOnly specific key types (\u003ccode\u003egoogleCredentials\u003c/code\u003e or \u003ccode\u003epkcs12\u003c/code\u003e) are supported when requesting the service account.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope is necessary for this request.\u003c/p\u003e\n"]]],[],null,[]]