POST https://graph.microsoft.com/v1.0/print/shares/{printerShareId}/allowedGroups/$ref
Content-Type: application/json
{
"@odata.id": "https://graph.microsoft.com/v1.0/groups/{groupId}"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var group = new Group
{
AdditionalData = new Dictionary<string, object>()
{
{"@odata.id", "https://graph.microsoft.com/v1.0/groups/{groupId}"}
}
};
await graphClient.Print.Shares["{printerShare-id}"].AllowedGroups.References
.Request()
.AddAsync(group);
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Group group = new Group();
group.additionalDataManager().put("@odata.id", new JsonPrimitive("https://graph.microsoft.com/v1.0/groups/{groupId}"));
graphClient.print().shares("{printerShareId}").allowedGroups().references()
.buildRequest()
.post(group);