MS Graph mail send API throwing "ErrorQuotaExceeded Cannot get ID from name" error
Sudhanshu Sharma
10
Reputation points
Error:
{
"statusCode": 403,
"code": "ErrorQuotaExceeded",
"requestId": null,
"date": "2023-08-04T20:58:35.640Z",
"body": "{\"code\":\"ErrorQuotaExceeded\",\"message\":\"Cannot get ID from name.\"}"
}
Hi, I am trying to send an email, using the graph API. I'm getting above mentioned error only for a specific user.
I'm sharing my code.
const mail = {
subject: `${email_data.subject}`,
toRecipients,
ccRecipients,
bccRecipients,
body: {
content: ' Hi, test mail ',
contentType: 'html',
},
attachments,
singleValueExtendedProperties: [
{
id: `String {${outlook_mail_guid}} Name oc_guid`,
value: 'createActivity',
},
],
};
let email = await CLIENT.api('/me/sendMail').post({ message: mail });
this code is working fine for all other users but my one user is getting
"{\"code\":\"ErrorQuotaExceeded\",\"message\":\"Cannot get ID from name.\"}"
this error. I debugged and found it's throwing an error because of the "singleValueExtendedProperties" id key if I don't pass this key in the mail payload then it works fine.
Please help me and let me know if you need any additional details from my end to investigate further.
Thanks
Sign in to answer