Issue with Microsoft Graph API - Updating a Message

Fabio Bove 0 Punti di reputazione
2024-08-27T07:09:18.33+00:00

Hello,

We are experiencing an issue with the Microsoft Graph API, specifically with the function to update a message.

According to the documentation available at the following link: https://zcusa.951200.xyz/en-us/graph/api/message-update?view=graph-rest-1.0&tabs=http, it is possible to modify the "replyTo" attribute of an existing message when it is in draft mode (isDraft=True). However, when we attempt to execute this call, it does not seem to work, even though it returns a status code 200.

Below are the details of my HTTP request:

  • Endpoint used:
  • Attribute I am trying to modify: "replyTo"
  • Response received: Status code 200

Here is the code snippet of the function used:


defdef update_email_data(email_id, new_data):
    api_endpoint = f"{ms_graph_endpoint}/{user_id}/mailFolders/Inbox/messages/{email_id}"
    response = requests.patch(api_endpoint, headers=graph_manager.headers, json=new_data)
    updated_email_id = response.json()["id"]
    return response, updated_email_id

Data passed for the update:


data = {
    data = {
    "subject": "TEST",
    "toRecipients": [
        {
            "emailAddress": {
                "name": "my_username",
                "address": "my_personal_email"
            }
        }
    ],
    "replyTo": [
        {
            "emailAddress": {
                "name": "my_username",
                "address": "my_personal_email"
            }
        }
    ]
}
resp, _ = update_email_data(email_id=retrieved_email_id, new_data=data)

We have verified that the message ID and other request details are correct. Additionally, other attributes such as 'subject' and "toRecipients" are being correctly modified.

Could you please assist us in resolving this issue? Is it possible that there are additional restrictions or requirements for modifying the "replyTo" attribute?

Thank you in advance for your support.

Best regards, F.

Microsoft Q&A
Microsoft Q&A
Usare questo tag per condividere suggerimenti, richieste di funzionalità e bug con il team di domande e risposte Microsoft. Il team di domande e risposte Microsoft valuterà regolarmente i commenti e suggerimenti e fornirà aggiornamenti lungo il percorso.
58 domande
0 commenti Nessun commento
{count} voti

1 risposta

Ordina per: Più utili
  1. Yordan Ivanov (Convergys Corporation) 1,200 Punti di reputazione Fornitore Microsoft
    2024-08-27T08:01:47.52+00:00

    Good day, Fabio,

    this is the italian forum.
    For english please visit the ENGLISH Q&A

    If you would like support in italian, please do let us know.

    Thank you

    0 commenti Nessun commento

Risposta

Le risposte possono essere contrassegnate come risposte accettate dall'autore della domanda. Ciò consente agli utenti di sapere che la risposta ha risolto il problema dell'autore.