message: createForward cannot trigger ccRecipients?

Alicia Quah Wei Ling 0 Reputation points
2024-11-26T12:03:04.85+00:00

my body input contains ccRecipients, but why output does not have?
i am using message:createForward

My input

{
  "receivedDateTime": "datetime-value",
  "sentDateTime": "datetime-value",
  "hasAttachments": true,
  "subject": "subject-value",
  "body": {
    "contentType": "",
    "content": "content-value"
  },
    "toRecipients":[
        {
            "emailAddress":{
                "address":"email1@email.com"
            }
        }
    ],
    "ccRecipients":[
        {
            "emailAddress":{
                "address":"email2@email.com"
            }
        },
        {
            "emailAddress":{
                "address":"email3@email.com"
            }
        },
        {
            "emailAddress":{
                "address":"email4@email.com"
            }
        }
    ],
  "comment": "<p>Hi aaa, </p></br><p>Approved, please help to attend this request.</p>",
  "bodyPreview": "bodyPreview-value"
}

This is my output:

{
  [my body content]
 
  },
  "sender": {
    "emailAddress": {
      "name": "Alicia Quah Wei Ling",
      "address": "email0@email.com"
    }
  },
  "from": {
    "emailAddress": {
      "name": "Alicia Quah Wei Ling",
      "address": "email0@email.com"
    }
  },
  "toRecipients": [
    {
      "emailAddress": {
        "name": "aaaaa",
        "address": "email1@email.com"
      }
    }
  ],
  "ccRecipients": [],
  "bccRecipients": [],
  "replyTo": [],
  "flag": {
    "flagStatus": "notFlagged"
  }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,551 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 7,590 Reputation points Microsoft Vendor
    2024-11-27T01:55:16.9366667+00:00

    Hello Alicia Quah Wei Ling,

    Thank you for reaching out to Microsoft Support!

    According to the documentation, when calling the createForward endpoint, this method does not need to provide the request body (except in MIME format), so the request body provided when we use JSON format will not work.

    User's image

    To work around this, you can call the Update message endpoint to modify the value of the ccRecipients property after creating the draft.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.