Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

REST API call 500 Internal Server error

(0) ShareShare
ReportReport
Posted on by 5

I am getting a HTTP 500 when I call /api/data/v8.2/accounts?$select=accountnumber,name&$top=5 from C#. Works in a browser.

{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Cache-Control: private
Server:
REQ_ID: 97cbcb60-1ee3-4d9e-8b1a-2241abfa5390
Persistent-Auth: true
Date: Thu, 29 Oct 2020 16:40:05 GMT
Content-Type: text/html
Content-Length: 1208
}}

Can I see more detail on the server side about the problem?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: REST API call 500 Internal Server error

    HI,

    Did you check Event Log on web server?

    The code I shared would work in both on-premise and Online. You can convert the response and see error reason.

    You can also try enabling Trace on server then check.

    support.microsoft.com/.../how-to-enable-tracing-in-microsoft-dynamics-crm

    Please mark my answer verified if i were helpful

  • moldy_xml Profile Picture
    moldy_xml 5 on at
    RE: REST API call 500 Internal Server error

    Thanks but I'm on premises so I don't think that's an option

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: REST API call 500 Internal Server error

    Hi,

    See below article to parse Error reason and code from WEB API C# code.

    xrmdynamicscrm.wordpress.com/.../

    Please mark my answer verified if i were helpful

  • RE: REST API call 500 Internal Server error

    Hi, You might be able to find raw logs for REST API call in LCS>Environment detail>Environment Monitoring>[Activity] tab

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans