We are working on the Graph API client app 'Send Email'. In order to attach a large file to an email message, I would like to use uploadAsync() or upload() method in the LargeFileUploadTask<AttachmentItem> class, instead of AttachmentFile#contentBytes().
AttachmentFile#contentBytes() method works fine except it is not memory-efficient.
We would like to stream data in uploading the attachment files instead of using the byte array.
The following code was tested with microsoft-graph Java SDK 5.64.0. It failed with
"Error code: InvalidAudience Error message: The audience claim value is invalid ..."
Also "401 : Unauthorized" can be seen in the stacktrace.