Try with below API call, please see the doc for more details - https://learn.microsoft.com/en-us/graph/api/message-copy?view=graph-rest-1.0&tabs=http
POST - https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/messages/{id}/copy
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am trying to perform below steps using MS Graph API
While trying to copy,it fails with below message
"SEVERE: Throwable detail: com.microsoft.graph.http.GraphServiceException: Error
code: ErrorInvalidIdMalformed
Error message: Id is malformed.
POST https://graph.microsoft.com/v1.0/users/<userid>/messages/<msg id>/microsoft.graph.copy
SdkVersion : graph-java/v5.41.0 "
Can you help how to fix issue?
Try with below API call, please see the doc for more details - https://learn.microsoft.com/en-us/graph/api/message-copy?view=graph-rest-1.0&tabs=http
POST - https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/messages/{id}/copy
I have tried to replicate your scenario and I am facing the same error when the destinationId or message id is wrong. Please refer to the below sample screenshot.
GET /users/{id | userPrincipalName}/messages/{id}
Graph API endpoint GET /users/{id | userPrincipalName}/mailFolders
Graph API
After passing the right id I was able to get desired result.
For more details, please refer to this documentation.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.
Hi ShivamDhiman-1582,
Any update on handling this scenario in batch?