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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

C# WebApi call : "Invalid URI: The Uri string is too long.",

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

I am experiencing below error

Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

I am trying to do Get Request 

Passed 1000 Guids

string path = "https://dev.api.crm.dynamics.com/api/data/v9.1/accounts?$select=name&$filter=Microsoft.Dynamics.CRM.In(PropertyName = 'accountid', PropertyValues = ["Guid"])

public JToken Get(string path, Dictionary<string, List<string>> headers = null)
{
return GetAsync(path, headers).Result;
}

Please assist..

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi Sai13,

    Could you share full code?

    In general, we should keep URL under 2000 characters when sending GET request.

    You could consider using batch operations for Web API request.

    https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/execute-batch-operations-using-web-api

    Here is sample in C#:

    https://thucnguyen77.blogspot.com/2019/02/dynamics-365-how-to-execute-batch.html

    Regards,

    Clofly

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 96 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans