Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 695 Bytes

File metadata and controls

20 lines (14 loc) · 695 Bytes
description Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest version. Current version is 6.x

GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);

PrinterShare printerShare = new PrinterShare();
printerShare.setDisplayName("ShareName");
printerShare.setAllowAllUsers(true);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("printer@odata.bind", "https://graph.microsoft.com/beta/print/printers/{id}");
printerShare.setAdditionalData(additionalData);
PrinterShare result = graphClient.print().shares().byPrinterShareId("{printerShare-id}").patch(printerShare);