Method: enterprises.enrollmentTokens.list
Stay organized with collections
Save and categorize content based on your preferences.
Lists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken object. Only the following fields are populated: name
, expirationTimestamp
, allowPersonalUsage
, value
, qrCode
. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete
active enrollment tokens as soon as they're not intended to be used anymore.
HTTP request
GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/enrollmentTokens
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The name of the enterprise in the form enterprises/{enterpriseId} .
|
Query parameters
Parameters |
pageSize |
integer
The requested page size. The service may return fewer than this value. If unspecified, at most 10 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.
|
pageToken |
string
A token identifying a page of results returned by the server.
|
Request body
The request body must be empty.
Response body
Response to a request to list enrollment tokens for a given enterprise.
If successful, the response body contains data with the following structure:
JSON representation |
{
"enrollmentTokens": [
{
object (EnrollmentToken )
}
],
"nextPageToken": string
} |
Fields |
enrollmentTokens[] |
object (EnrollmentToken )
The list of enrollment tokens.
|
nextPageToken |
string
If there are more results, a token to retrieve next page of results.
|
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidmanagement
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-19 UTC.
[null,null,["Last updated 2025-02-19 UTC."],[[["\u003cp\u003eThis operation lists active, unexpired enrollment tokens for a given enterprise, providing a partial view of the EnrollmentToken object with specific fields populated.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the enterprise ID as a path parameter and allows for pagination using query parameters \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of enrollment tokens and a token for retrieving the next page of results if available.\u003c/p\u003e\n"],["\u003cp\u003eFor security, it is recommended to delete active enrollment tokens when they are no longer needed.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/androidmanagement\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],["This document outlines the process of listing active enrollment tokens for an enterprise using a `GET` request. The request targets `enterprises/{enterpriseId}/enrollmentTokens` and requires a `parent` path parameter specifying the enterprise ID. Optional query parameters, `pageSize` and `pageToken`, manage result pagination. The request body must be empty. A successful response includes a list of `enrollmentTokens`, containing fields like name, expiration, usage allowance, value and qr code, and an optional `nextPageToken` for subsequent pages. This action requires the `androidmanagement` OAuth scope.\n"],null,["# Method: enterprises.enrollmentTokens.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListEnrollmentTokensResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken object. Only the following fields are populated: [`name`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.name), [`expirationTimestamp`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.expiration_timestamp), [`allowPersonalUsage`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.allow_personal_usage), [`value`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.value), [`qrCode`](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken.FIELDS.qr_code). This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to [delete](/android/management/reference/rest/v1/enterprises.enrollmentTokens/delete#google.android.devicemanagement.v1.DeviceManagementService.DeleteEnrollmentToken) active enrollment tokens as soon as they're not intended to be used anymore.\n\n### HTTP request\n\n`GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/enrollmentTokens`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the enterprise in the form `enterprises/{enterpriseId}`. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The requested page size. The service may return fewer than this value. If unspecified, at most 10 items will be returned. The maximum value is 100; values above 100 will be coerced to 100. |\n| `pageToken` | `string` A token identifying a page of results returned by the server. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse to a request to list enrollment tokens for a given enterprise.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"enrollmentTokens\": [ { object (/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enrollmentTokens[]` | `object (`[EnrollmentToken](/android/management/reference/rest/v1/enterprises.enrollmentTokens#EnrollmentToken)`)` The list of enrollment tokens. |\n| `nextPageToken` | `string` If there are more results, a token to retrieve next page of results. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidmanagement`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]