Create allowedUser for printerShare

Namespace: microsoft.graph

Grant the specified user access to submit print jobs to the associated printerShare.

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

POST /print/shares/{printerShareId}/allowedUsers/$ref

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a reference to a user entity by using the @odata.id format, as shown in the following example.

Response

If successful, this method returns a 204 No Content response code.

Examples

Request

POST https://graph.microsoft.com/v1.0/print/shares/{printerShareId}/allowedUsers/$ref
Content-Type: application/json

{
  "@odata.id": "https://graph.microsoft.com/v1.0/users/{userId}"
}

Response

HTTP/1.1 204 No Content