web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Mark as read or unread...
Power Automate
Unanswered

Mark as read or unread failed: The response is not in a JSON format

(1) ShareShare
ReportReport
Posted on by 6

Hello,

 

i am trying to create a flow which should mark an E-Mail from a shared Inbox as read. It is a simple flow, which should be also integrated in Power Apps. But i am not able to make it work. 

This is the flow:

jeneeben_1-1719832665366.png

And i am getting the error:

jeneeben_2-1719832882962.png

The raw output is:

 

 

 

{
 "statusCode": 400,
 "headers": {
 "Cache-Control": "private",
 "Transfer-Encoding": "chunked",
 "Vary": "Accept-Encoding",
 "Strict-Transport-Security": "max-age=31536000",
 "request-id": "e3329b7e-1052-4fc5-9069-341d7a05f0c3",
 "client-request-id": "e3329b7e-1052-4fc5-9069-341d7a05f0c3",
 "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"Switzerland North\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"000\",\"RoleInstance\":\"ZR1PEPF00000663\"}}",
 "x-ms-environment-id": "9c4ab2f4-c0d2-e62b-b43c-0e1eea556041",
 "x-ms-tenant-id": "ecf99eb6-03bd-4d59-959c-89866dc5bc27",
 "Timing-Allow-Origin": "*",
 "x-ms-apihub-cached-response": "true",
 "x-ms-apihub-obo": "false",
 "Date": "Mon, 01 Jul 2024 11:18:34 GMT",
 "Content-Type": "application/json",
 "Content-Length": "3918"
 },
 "body": {
 "error": {
 "code": 400,
 "source": "switzerland-001.azure-apihub.net",
 "clientRequestId": "15e75e31-2856-431d-b00b-a052d8cfd878",
 "message": "The response is not in a JSON format.",
 "innerError": "<!DOCTYPE html>\r\n<html>\r\n <head>\r\n <title>Runtime Error</title>\r\n <meta name=\"viewport\" content=\"width=device-width\" />\r\n <style>\r\n body {font-family:\"Verdana\";font-weight:normal;font-size: .7em;color:black;} \r\n p {font-family:\"Verdana\";font-weight:normal;color:black;margin-top: -5px}\r\n b {font-family:\"Verdana\";font-weight:bold;color:black;margin-top: -5px}\r\n H1 { font-family:\"Verdana\";font-weight:normal;font-size:18pt;color:red }\r\n H2 { font-family:\"Verdana\";font-weight:normal;font-size:14pt;color:maroon }\r\n pre {font-family:\"Consolas\",\"Lucida Console\",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}\r\n .marker {font-weight: bold; color: black;text-decoration: none;}\r\n .version {color: gray;}\r\n .error {margin-bottom: 10px;}\r\n .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }\r\n @media screen and (max-width: 639px) {\r\n pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }\r\n }\r\n @media screen and (max-width: 479px) {\r\n pre { width: 280px; }\r\n }\r\n </style>\r\n </head>\r\n\r\n <body bgcolor=\"white\">\r\n\r\n <span><H1>Server Error in '/API' Application.<hr width=100% size=1 color=silver></H1>\r\n\r\n <h2> <i>Runtime Error</i> </h2></span>\r\n\r\n <font face=\"Arial, Helvetica, Geneva, SunSans-Regular, sans-serif \">\r\n\r\n <b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.\r\n <br><br>\r\n\r\n <b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a &lt;customErrors&gt; tag within a &quot;web.config&quot; configuration file located in the root directory of the current web application. This &lt;customErrors&gt; tag should then have its &quot;mode&quot; attribute set to &quot;Off&quot;.<br><br>\r\n\r\n <table width=100% bgcolor=\"#ffffcc\">\r\n <tr>\r\n <td>\r\n <code><pre>\r\n\r\n&lt;!-- Web.Config Configuration File --&gt;\r\n\r\n&lt;configuration&gt;\r\n &lt;system.web&gt;\r\n &lt;customErrors mode=&quot;Off&quot;/&gt;\r\n &lt;/system.web&gt;\r\n&lt;/configuration&gt;</pre> </code>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <br>\r\n\r\n <b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the &quot;defaultRedirect&quot; attribute of the application&#39;s &lt;customErrors&gt; configuration tag to point to a custom error page URL.<br><br>\r\n\r\n <table width=100% bgcolor=\"#ffffcc\">\r\n <tr>\r\n <td>\r\n <code><pre>\r\n\r\n&lt;!-- Web.Config Configuration File --&gt;\r\n\r\n&lt;configuration&gt;\r\n &lt;system.web&gt;\r\n &lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/&gt;\r\n &lt;/system.web&gt;\r\n&lt;/configuration&gt;</pre> </code>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <br>\r\n\r\n </font>\r\n\r\n </body>\r\n</html>\r\n"
 }
 }
}

 

 

 

You can see this HTML code under "innerError"

 

Server Error in '/API' Application.


Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>

 

I have no idea what might be the issue. 

Do you have any clue?

 

Regards,

Jeneeben

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @jeneeben 

     

    You need 'Message Id' of an email to mark it read or unread. What are the input parameters passed from power app? 

     

     

  • jeneeben Profile Picture
    6 on at

    Hi,

     

    yes, i am using the internetMessageId from power app. I guess it is the correct one, because if i use some random not valid numbers, i am getting a different error message.

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    InternetMessageId is different from 'Message Id'. Please check if you can get ID from the power apps & pass it to flow via input parameter.

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • jeneeben Profile Picture
    6 on at

    Hmm still not working. I can choose an ID or a conversation ID in power apps. 

    But i am getting following error:

    jeneeben_1-1719837337591.png

    The raw output being

    {
     "statusCode": 400,
     "headers": {
     "Cache-Control": "private",
     "Transfer-Encoding": "chunked",
     "Vary": "Accept-Encoding",
     "Strict-Transport-Security": "max-age=31536000",
     "request-id": "5c77083f-49a0-46cd-9235-be9b4ae236cf",
     "client-request-id": "5c77083f-49a0-46cd-9235-be9b4ae236cf",
     "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"Switzerland North\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"ZRH2EPF000000E8\"}}",
     "x-ms-environment-id": "9c4ab2f4-c0d2-e62b-b43c-0e1eea556041",
     "x-ms-tenant-id": "ecf99eb6-03bd-4d59-959c-89866dc5bc27",
     "Timing-Allow-Origin": "*",
     "x-ms-apihub-cached-response": "true",
     "x-ms-apihub-obo": "false",
     "Date": "Mon, 01 Jul 2024 12:29:12 GMT",
     "Content-Type": "application/json",
     "Content-Length": "169"
     },
     "body": {
     "error": {
     "code": "ErrorIncorrectRoutingHint",
     "message": "The x-anchor mailbox '\"support@company.xx\"' does not match the target of the request."
     }
     }
    }

     

    Also i checked the Message ID directly in Outlook. And the internetMessageID is the same ID.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard