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 :
Supply chain | Supply Chain Management, Commerce
Unanswered

Store Access token and send it as a part of the API request to APIM

(0) ShareShare
ReportReport
Posted on by 678

Hi,

I would like to place APIM in front of our logic App which means that we will have to get an access token with credentials and then send it as a part API request to APIM. 

In Postman it works out-of-the-box (see screenshow below).

pastedimage1674205824511v1.png

How can we store it in D365 SCM and add it as a part of the API request to APIM? 

If the customization is required, please specify how the customization needs to be done (like stored it in Temp table etc)

Thank you. 

I have the same question (0)
  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Please start by explaining your scenario. Do I understand correctly that you want to call a logic app from F&O?

    Shouldn't you store a client secret in F&O database and use it to request a token? Or do you have another idea regarding authentication?

  • ShawnDEV Profile Picture
    678 on at

    Yes exactly,

    I will store credentials in D365 ofc.

    I am more into 'storing Access token' somewhere in D365 to be added as a header of JSOM string we send to Logic App (via APIM)

    what is the best approach to store the access token we get from O Auth 2 service?

    in Temp table or how?

    Thank you.

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Your design isn't correct. The token has a short lifetime, therefore it would stop working very soon. You really need to request a token when needed.

  • ShawnDEV Profile Picture
    678 on at

    Hi,

    Can D365 technically request an access token from AAD based on the credentials which I am going to store in D365 table and add it the request header?

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Yes. You can register an app in AAD, get an application and client secret used that for authentication (getting an token).

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 271 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 171 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans