title | description | author | localization_priority | ms.prod | doc_type |
---|---|---|---|---|---|
Get shares |
Retrieve a list of printer shares. |
braedenp-msft |
Normal |
universal-print |
apiPageType |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Retrieve a list of printerShares.
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. |
GET /print/shares
This method supports some of the OData query parameters to help customize the response. For general information, see OData query parameters.
Some operators are not supported: $count
, $orderby
, $search
.
Name | Description |
---|---|
Authorization | Bearer {token}. Required. |
Do not supply a request body for this method.
If successful, this method returns a 200 OK
response code and a collection of printerShare objects in the response body.
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]
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"
}
]
}