Download printDocument binary file

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Download the binary file associated with a printDocument. Calling this method yields a redirect response with a preauthenticated URL that can be used to download the payload.

This API is supported in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

In addition to the following permissions, the user or app's tenant must have an active Universal Print subscription and have a permission that grants Get printer access.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) PrintJob.Read, PrintJob.Read.All, PrintJob.ReadWrite, PrintJob.ReadWrite.All
Delegated (personal Microsoft account) Not Supported.
Application PrintJob.Read.All, PrintJob.ReadWrite.All

HTTP request

GET /print/printers/{id}/jobs/{id}/documents/{id}/$value

Request headers

Name Description
Authorization Bearer {token}. Required.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns 302 Found and the preauthenticated download URL in the Location header.

Examples

The following example shows how to call this API to acquire a preauthenticated download URL. To start the download, follow the redirect URL in the response.

Request

GET https://graph.microsoft.com/beta/print/printers/fcb0bc53-a446-41d0-bfc3-5c56cdbb0f2a/jobs/46140/documents/bd260b1a-044e-4ca6-afa9-17d9a587d254/$value

Response

HTTP/1.1 302 Found
Location: https://print.print.microsoft.com/downloads/bd260b1a-044e-4ca6-afa9-17d9a587d254?tempauthtoken={accesstoken}