PrinterShare.ReadWrite.All
Allows the application to read and update printer shares on behalf of the signed-in user.
Permission Details
Read and write printer shares
Allows the application to read and update printer shares on behalf of the signed-in user.
06ceea37-85e2-40d7-bec3-91337a46038f
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
allowAllUsers |
Boolean |
If true, all users and groups will be granted access to this printer share. This supersedes the allow lists defined by the allowedUsers and allowedGroups navigation properties. |
capabilities |
printerCapabilities |
The capabilities of the printer associated with this printer share. Inherited from printerBase. |
createdDateTime |
DateTimeOffset |
The DateTimeOffset when the printer share was created. Read-only. |
defaults |
printerDefaults |
The default print settings of the printer associated with this printer share. Inherited from printerBase. |
displayName |
String |
The name of the printer share that print clients should display. Inherited from printerBase. |
id |
String |
The printerShare's identifier. Inherited from printerBase. Read-only. |
isAcceptingJobs |
BooleanNullable |
Whether the printer associated with this printer share is currently accepting new print jobs. Inherited from printerBase. |
location |
printerLocation |
The physical and/or organizational location of the printer associated with this printer share. Inherited from printerBase. |
manufacturer |
StringNullable |
The manufacturer reported by the printer associated with this printer share. Inherited from printerBase. Read-only. |
model |
StringNullable |
The model name reported by the printer associated with this printer share. Inherited from printerBase. Read-only. |
status |
printerStatus |
The processing status, including any errors, of the printer associated with this printer share.Inherited from printerBase. Read-only. |
viewPoint |
printerShareViewpoint |
Additional data for a printer share as viewed by the signed-in user. |
allowedGroups |
group collection |
The groups whose users have access to print using the printer. |
allowedUsers |
user collection |
The users who have access to print using the printer. |
jobs |
printJob collection |
The list of jobs that are queued for printing by the printer/printerShare. |
Showing 15 of 16 properties.
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.printerShare",
"id": "String (identifier)",
"displayName": "String",
"manufacturer": "String",
"model": "String",
"isAcceptingJobs": "Boolean",
"defaults": {
"@odata.type": "microsoft.graph.printerDefaults"
},
"location": {
"@odata.type": "microsoft.graph.printerLocation"
},
"capabilities": {
"@odata.type": "microsoft.graph.printerCapabilities"
},
"status": {
"@odata.type": "microsoft.graph.printerStatus"
},
"allowAllUsers": "Boolean",
"createdDateTime": "String (timestamp)",
"viewPoint": {
"@odata.type": "microsoft.graph.printerShareViewpoint"
}
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
printer |
printer |
The printer that this printer share is related to. |
allowedUsers |
user collection |
The users who have access to print using the printer. |
allowedGroups |
group |
The groups whose users have access to print using the printer. |
jobs |
printJob collection |
The list of jobs that are queued for printing by the printer associated with this printer share. |
status |
printerStatus |
Related status data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ReferenceCreate
{
OdataId = "https://graph.microsoft.com/v1.0/groups/{groupId}",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Print.Shares["{printerShare-id}"].AllowedGroups.Ref.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const group = {
'@odata.id': 'https://graph.microsoft.com/v1.0/groups/{groupId}'
};
await client.api('/print/shares/{printerShareId}/allowedGroups/$ref')
.post(group);
Import-Module Microsoft.Graph.Devices.CloudPrint
$params = @{
"@odata.id" = "https://graph.microsoft.com/v1.0/groups/{groupId}"
}
New-MgPrintShareAllowedGroupByRef -PrinterShareId $printerShareId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.reference_create import ReferenceCreate
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ReferenceCreate(
odata_id = "https://graph.microsoft.com/v1.0/groups/{groupId}",
)
await graph_client.print.shares.by_printer_share_id('printerShare-id').allowed_groups.ref.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Delegated permissions and search for PrinterShare.ReadWrite.All
Grant Admin Consent
This delegated permission requires admin consent.