Delete printerShare

Namespace: microsoft.graph

Delete a printer share (unshare the associated printer). This action cannot be undone. If the printer is shared again in the future, any Windows users who had previously installed the printer will need to discover and reinstall it.

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 in the following table. The signed in user must be a Printer Administrator.

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

HTTP request

DELETE /print/shares/{printerShareId}

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 204 No Content response code. It does not return anything in the response body.

Examples

Request

DELETE https://graph.microsoft.com/v1.0/print/shares/{printerShareId}

Response

HTTP/1.1 204 No Content