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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to do API calls from other system to D365

(2) ShareShare
ReportReport
Posted on by 1,212
 As other system will transfer data to D365 FnO via API, please advise whether and how to restrict this API to access particular data entity
 
as my understanding
1) To do app registeration in Azure portal for getting client id and secret value
2) To make authenication call with client id and secret value to acquire token
3) to make API with this token to access D365 for doing CRUD.
 
In view that this API can do any actions in D365, is it possible to restrict it to access particular data entity instead of all data entities? Additionally, can it restrict to do particular action, for example, get data.
 
Thank in advance
 
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    236,316 Most Valuable Professional on at
    How to do API calls from other system to D365
    You have two options:
    1. Either users will use their own credentials to log in. Then the security role of the user will apply. In code, you can check permissions of the user.
    2. Or you'll use client app ID and associate with the a user in F&O. Everyone using that will have permissions of the given F&O users.
    It sounds like you want 1 but are using 2.
  • J_Lee Profile Picture
    1,212 on at
    How to do API calls from other system to D365
    Thank Martin.
     
    The option 2 is good for my situation. May i ask for more advice?
     
    1) do i use the 'User Id' to restrict it?
     
    2) when i make authenication call, which grant type should be used? grant type = password?
     
    I am beginner in D365 FnO, please provide me more guideline.
    Thank u so much
  • Martin Dráb Profile Picture
    236,316 Most Valuable Professional on at
    How to do API calls from other system to D365
    1) Yes, that where you say which F&O user will be used for the given client ID. The users that have security role(s) granting some permissions inside F&O.#
    2) No, you aren't using a username and a password - you said you wanted touse the client ID and secret. In that case, client_credentials it the right grant type. By the way, you often don't need to deal with such implementation details (like setting grant_type in a request), because there usually is a library for working with OData. For example, there is ConfidentialClientApplicationBuilder will make the request for you; you just need to use its methods such as WithClientSecret().
  • Anton Venter Profile Picture
    20,297 Super User 2025 Season 2 on at
    How to do API calls from other system to D365
    In addition to what Martin wrote. I have a question about the volume of data that you want to integrate. Will you be sending a lot of data at once to F&O?
  • J_Lee Profile Picture
    1,212 on at
    How to do API calls from other system to D365
    Thank Martin and Anton.
     
    I have integrated around 30 records per time with JSON format.
     
    I have little bit confused. If it is still used client credential, how can restrict the data access?
  • Martin Dráb Profile Picture
    236,316 Most Valuable Professional on at
    How to do API calls from other system to D365
    We already had this discussion and you explicitly choose to use client ID and secret, saying: "The option 2 is good for my situation". Maybe you want to change your mind now.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,157

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 883 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 674 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans