Skip to content

Latest commit

 

History

History
110 lines (91 loc) · 3.33 KB

print-list-shares.md

File metadata and controls

110 lines (91 loc) · 3.33 KB
title description author localization_priority ms.prod doc_type
Get shares
Retrieve a list of printer shares.
braedenp-msft
Normal
universal-print
apiPageType

List shares

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Retrieve a list of printerShares.

Permissions

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

To use the Universal Print service, the user or app's tenant must have an active Universal Print subscription, in addition to the permissions listed listed in the following table.

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

HTTP request

GET /print/shares

Optional query parameters

This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters.

Exceptions

Some operators are not supported: $count, $orderby, $search.

Request headers

Name Description
Authorization Bearer {token}. Required.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of printerShare objects in the response body.

Example

Request

The following is an example of the request.

GET https://graph.microsoft.com/beta/print/shares

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 269

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#print/shares",
  "value": [
    {
      "id": "016b5565-3bbf-4067-b9ff-4d68167eb1a6",
      "name": "PrinterShareName",
      "createdDateTime": "2020-02-04T00:00:00.0000000Z"
    }
  ]
}