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
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:
[[["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-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,["- [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\nHTTP 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\nPath parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the enterprise in the form `enterprises/{enterpriseId}`. |\n\nQuery 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\nRequest body\n\nThe request body must be empty.\n\nResponse body Response 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\nAuthorization 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)."]]