POST https://graph.microsoft.com/beta/print/shares/{id}/allowedUsers/$ref
Content-type: application/json
{
"@odata.id": "https://graph.microsoft.com/beta/users/{id}"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var user = new User
{
AdditionalData = new Dictionary<string, object>()
{
{"@odata.id", "https://graph.microsoft.com/beta/users/{id}"}
}
};
await graphClient.Print.Shares["{printerShare-id}"].AllowedUsers.References
.Request()
.AddAsync(user);
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
User user = new User();
user.additionalDataManager().put("@odata.id", new JsonPrimitive("https://graph.microsoft.com/beta/users/{id}"));
graphClient.print().shares("{id}").allowedUsers().references()
.buildRequest()
.post(user);