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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Outlook REST API "Inte...
Power Automate
Answered

Outlook REST API "Internal Server Error" for any query -- new line added to URI?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
I have been trying to use the "Send an HTTP Request" action in the office365 Outlook connector, and every time it tries, I get a 500 Internal Server Error response.
 
My parameters are:
 
Method: GET
 
I'm not using any advanced parameters at the moment, because I can't get even a simple request to work.
 
When I look at a failed request, this is what I see:
Parameters:
{
  "Uri": "https://graph.microsoft.com/v1.0/me/mailFolders/\n",
  "Method": "GET"
}
Status code: 500
Body:
{
  "error": {
    "code": 500,
    "message": "Object reference not set to an instance of an object.",
    "source": "(some guid).19.common.usa002.azure-apihub.net",
    "path": "choose[7]\\when[1]",
    "policyId": "",
    "clientRequestId": "(some guid)",
    "dreeSet": "true"
  }
}
I redacted the GUIDs in case they are sensitive, I don't know.
 
Anyways, I noticed that any Uri that is sent always has a `\n` at the end, which would normally be a new line character but it looks like it's sending the raw slash + n, and I'm guessing that's the reason. If that's the case, how do I fix it? There's no new line at the end of my URI value in the text box.
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,520 Super User 2026 Season 1 on at
    Remove the highlighted portion of the Uri: https://graph.microsoft.com/v1.0/me/mailFolders/\n
     
    What were you trying to do with "/\n"?
     
    To fix it, you will need to show your workflow and how you have configured the HTTP request. Since you type in the Uri in the action, I don't know how it is getting passed through the HTTP request when the flow runs without seeing it.
     
    You can use the Graph API explorer at Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph to test this with.
  • JW-04030208-0 Profile Picture
    Microsoft Employee on at
    I'm not adding the \n, that's the problem. I don't know how it's being added there.
     
    This is what my configuration of the action is: 
     
    I have tested the URI in the graph explorer and it works just fine there.
  • David_MA Profile Picture
    14,520 Super User 2026 Season 1 on at
    Just ran it, no issues:
     
    I would configure it as shown above. If you copy and pasted the value into the URI field, the \n is probably hidden. If you copy and paste, be sure to paste it as plain text or manually enter the value into the field.
     
  • JW-04030208-0 Profile Picture
    Microsoft Employee on at
    For some reason, I have tried to reply to this twice now and it doesn't appear to be posting.
     
    I typed everything exactly how you have yours, and the code view still shows a \n at the end of the URI. Without the / at the end, like you have, I now get a 411 status code, and it says "HTTP Error 411. The request must be chunked or have a content length."
  • Verified answer
    David_MA Profile Picture
    14,520 Super User 2026 Season 1 on at
    I would try deleting the action and add it back in. Maybe also switch to using the old designer. There have been numerous issues with the new designer and maybe something with it is causing the \n character to be added. Although, the flow I created used the new designer and I had no issue. You should check to make sure you are using the Microsoft Outlook 365 HTTP action as I show in my earlier post. Your screen shot does not show which action you are using for the HTTP request.
  • JW-04030208-0 Profile Picture
    Microsoft Employee on at
    You know what? I just went to the old designer like you suggested, and this is what the URI box looked like:
     
    and it worked as soon as I deleted the new line that was there. It looks like the answer here is "don't use the new designer" haha

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 809

#3
Haque Profile Picture

Haque 645

Last 30 days Overall leaderboard