Skip to main content

Notifications

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 674

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. 

  • Martin Dráb Profile Picture
    232,877 Most Valuable Professional on at
    RE: Store Access token and send it as a part of the API request to APIM

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

  • ShawnDEV Profile Picture
    674 on at
    RE: Store Access token and send it as a part of the API request to APIM

    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
    232,877 Most Valuable Professional on at
    RE: Store Access token and send it as a part of the API request to APIM

    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
    674 on at
    RE: Store Access token and send it as a part of the API request to APIM

    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
    232,877 Most Valuable Professional on at
    RE: Store Access token and send it as a part of the API request to APIM

    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?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,137 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,877 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans