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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Integration of odata Api

(0) ShareShare
ReportReport
Posted on by 10

Hi,

I am trying to use the d365 F&O APIs to pull the Data entities data. I have followed the instructions to get the access token using oauth flow. I have an app in azure directory. I am able to get the access token. But when I try to hit the odata APIs with that token, it gives me 401 Unauthorised. I don't know what I have been doing wrong. I followed the instructions but could not get APIs working. Any help would be appreciated.

Let me know if you guys need any other information.

Thanks

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    First of all try to connect via postman docs.microsoft.com/.../third-party-service-test to confirm that settings are correct. IF you cannot, check that you added application id to FnO and mapped to a user, also check that url is correct, somethims you may have trailing slash in the url.

  • rajatkonigle Profile Picture
    10 on at

    I have done everything you mentioned. However when i tries to debug my jwt token, in the "aud" part, i got this {"aud": "00000002-0000-0000-c000-000000000000", ...} which does not seem to be correct, any idea why? also i dont have "upn" in my jwt token info. Maybe the access token is not valid, but not sure why.

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at
  • rajatkonigle Profile Picture
    10 on at

    i have gone through every possible documentation present there, nothing worked. I am not sure why i am getting 00000002-0000-0000-c000-000000000000 in aud. They dont talk about this in the doc you mentioned. How do i inspect what is causing these values in jwt. I followed this to get the token , docs.microsoft.com/.../v1-protocols-oauth-code

    Can you let me know if this is way to get the token to access OData APIs. Or i am using wrong doc to get the token.

  • Martin Dráb Profile Picture
    238,865 Most Valuable Professional on at

    I suggest that you don't implement it by yourself at all - use the authentication utility provided by Microsoft as a part of sample integration applications on GitHub.

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Moved to D365 Finance forum.

    I recommend you to check out the Integration Sample app from Microsoft. It has an OData console app sample as well.

    It's a fully functional solution which you can debug and also use as a documentation.

    And you can use it to determine if your problem is in your AAD app registration or in your code (or both).

    github.com/.../Dynamics-AX-Integration

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 473

#3
Adis Profile Picture

Adis 284 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans