An API that connects multiple Microsoft services, enabling data access and automation across platforms
How to deal a 400 error from GraphAPI when input looks valid
I have an application that uses Microsoft Graph to send emails. Several times a day I am getting an OADataError with a response code of 400 error from the SDK, reporting "At least one recipient is not valid., A message can't be sent because it contains no recipients.".
When the error occurs, I log the Message object, as follows:
TO: ******@email.com/noname ---- email address and name from the EmailAddress object (email addressed obfuscated)
CC: NONE!
BCC: NONE!
Body: <!DOCTYPE html>\r\n<html>...</html></html> ---- contents of body elided
Note that this message does contain a valid email address (verified by resending the message at a future
Q: Any ideas what is going on here?!?