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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

How to generate access token in D365 F&O

(0) ShareShare
ReportReport
Posted on by 45

Hi All,

I have a scenario where i am having an API that needs to be called from D365 F&O through x++ code. I tested it in postman and its working fine. Now i need to add X++ code to generate access token, then use this token to call API. 

I am not sure how to achieve that. If someone can help me with sample code will be of great help.

goshoom  - Could you please help on this

Thanks,

Dev

I have the same question (0)
  • Dev Shekhawat Profile Picture
    45 on at
    RE: How to generate access token in D365 F&O

    Hi goshoom ,

    By API, yes i meant REST API. Also when i talk about token its using Client id and client secret from Azure. Find below screenshot of postman(removed client id and secret from screenshot).

    pastedimage1650528433708v1.png

    Thanks,

    Dev

  • Martin Dráb Profile Picture
    235,800 Most Valuable Professional on at
    RE: How to generate access token in D365 F&O

    API is extremely generic term - it covers any programming interface.

    I guess that you're talking about a RESTful web services, therefore you'll need to send an HTTP request.

    You also mentioned an access token, but that can also mean many things. Please tell us which authorization mechanism is used by your web service. For example, you may want to show us the steps that you did in Postman (that you're now trying to do from X++).

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 433

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 67 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans