Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Can Dynamics Web Api be used to retrieve accounts by field instead of GUID?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is it possible to use the Dynamics Web Api to retrieve accounts/contacts using field values instead of GUID?

This throws a bad request error: https://mydomain.crm9.dynamics.com/api/data/v8.0/accounts(name='My Account Name')

 "code":"","message":"Bad Request - Error in query syntax.","innererror":{
      "message":"Bad Request - Error in query syntax.","type":"Microsoft.OData.Core.ODataException","stacktrace":"   at

Thanks in advance,

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Can Dynamics Web Api be used to retrieve accounts by field instead of GUID?

    Thank you so much.  This worked perfectly.

  • Verified answer
    RE: Can Dynamics Web Api be used to retrieve accounts by field instead of GUID?

    You can use request like below, for example for searching account with 'New Client' name:

    https://<domain>.crm.dynamics.com/api/data/v9.0/accounts?$select=name&$filter=name eq 'New Client'

    If the name field is unique, you will get one record, if not - in response you will get more than one record.

    Look here for more details: docs.microsoft.com/.../query-data-web-api

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans