by Doug Stevens.
Hi all, I'm writing a Power Automate Flow that will watch for unread moodle messages and send them to MS Teams for our teachers. The only challenge is that after sending the message to Teams I want to mark it as read (so the script doesn't keep sending it). Unfortunately when I send:
{
"wstoken": "stuff",
"wsfunction": "core_message_mark_message_read",
"messageid": "262105" <<-- Returned from the id field of core_message_get_messages
}
it returns
<EXCEPTION class="invalid_parameter_exception">
<ERRORCODE>invalidparameter</ERRORCODE>
<MESSAGE>Invalid parameter value detected</MESSAGE>
<DEBUGINFO>Invalid messageid, you don't have permissions to mark this message as read</DEBUGINFO>
</EXCEPTION>
I've elevated the user attached to the token to the system administrator to no avail. Any ideas?
Thanks in advance,
Doug