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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to expose only few fields in standard data entity in D365FO

(0) ShareShare
ReportReport
Posted on by 59

Is exposing O-data entity allows to misuse the data's? We are having a custom table and in that we are using relation to customer table. Even though at a time our client can login to only one customer we do not want them to see other legal entity data's. Is there any way to force 3rd party application to add filter to the entity while they are consuming? Or is there any way to expose only selected fields without service class (like property in entity or staging table)?

I have the same question (0)
  • Suggested answer
    zhifeng Profile Picture
    Microsoft Employee on at

    Hello Keerthanaa, 

    Below is one example you can refer show only selected fields. 

    List all the customers, but show only the first name and last name properties.docs.microsoft.com/.../odata

    [Your organization's root URL]/data/Customers?$select=FirstName,LastName List all the customers, but show only the first name and last name properties.
  • Keerthanaa Ilangovan Profile Picture
    59 on at

    Thanks for the reply. Is there any way to force the consuming 3rd party application to apply any filter (Eg: customer ID) on their API call (If they don't apply the filter no data should returned from the data entity).

  • Suggested answer
    zhifeng Profile Picture
    Microsoft Employee on at

    You can refer below article add filter for Odata call:

    docs.microsoft.com/.../odata

  • Keerthanaa Ilangovan Profile Picture
    59 on at

    Thanks for the reply Kevin.

    Sorry if I have misinterpreted the question. My actual need is, I have a custom table which has a relationship to customer table. I'm creating a data entity for my custom table and exposing it via o-data. When a 3rd party application connects the data entity and reads the record, is there a way that I send the response only if there is a filter for customer ID (If there is no customer ID passed in the requesting API call, the data entity should not return any values) can this be achieved?

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    306,290 Super User 2026 Season 1 on at

    Hi Keerthanaa,

    This is not possible. Without a filter, OData will return all records. There is no option to enforce parameters. You can restrict access via Organization assignment to restrict the legal entities. If each customer is using an own login and if records in your table and other tables needs to be restricted, you can use eXtensible Data Security (XDS policies) to constrain the tables.

  • keerthanaa Profile Picture
    5 on at

    Thanks for the reply André.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 410 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 390

#3
Martin Dráb Profile Picture

Martin Dráb 262 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans