Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

How to Access Customer's Addresses given Customer Account Number Programmatically via OData

(1) ShareShare
ReportReport
Posted on by 52
Hi everyone! 
 
I am using Microsoft.OData.Client and Microsoft.Dynamics.DataEntities to programmatically access elements from D365 using OData, such as access Sales Orders and creating them. 
 
I would like to access a customer's addresses, with all address information including some customisation fields that we have included. Using the D365 portal, this can be done by viewing all customers, finding the desired customer and clicking on them, viewing their details (there is a subsection called Addresses), clicking Advanced, and a list of all address details are presented as shown below:
 
Using the OData library, how can this information be accessed? I have tried to get the customer object using Customers, CustomersV2, and CustomersV3 Entities, but none of them have a list of addresses that I can access. Is there another way? 
 
Thanks in advance! 
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,965 Super User 2025 Season 1 on at
    How to Access Customer's Addresses given Customer Account Number Programmatically via OData
    Hi Mar23,

    There is an entity called CustomerPostalAddress. You can use this one for multiple customer addresses. Ensure that you will extend this entity to be able to use your custom fields.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans