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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

No P3P policy defined. Read the Microsoft privacy statement at https://go.microsoft.com/fwlink/?LinkId=271135

(0) ShareShare
ReportReport
Posted on by 414

I am currently integrating a 3rd party application with Dynamics D365 using Odata. I did this a few months ago and it worked fine. I followed the same procedure this time as well.

I registered the app as a web app in Azure Active Directory. Acquired the Directory ID, App ID, client secret and selected the Microsoft Dynamics ERP API and granted the needed delegated permissions.

I created the service account in D365 F&O. I can acquire a token from https://login.microsoftonline.com/[tenant_id]/oauth2/token and it is successful. But when I try to access the data I am greeted with a 401 Authentication failed.

I checked if TLS versions enabled in the browser and it supports 1.0 , 1.1 & 1.2
I decoded the bearer token at https://jwt.ms/ and all the needed information was inside the token. All permissions in AAD was granted by an administrator and was successful. Tried generating a new client secret and entered it at all the appropriate places. Still authentication failed. Even contacted Microsoft who could not help me.

I have the same question (0)
  • Suggested answer
    Rahul Mohta Profile Picture
    21,032 on at

    try and do it in a dev box and and could get more details from event viewer

    the client secret must be date valid 

  • WillWU Profile Picture
    22,361 on at

    Hi YOG,

    This error is usually caused by a wrong config and it may be a typo.

    Please check your url and make sure that you got the spaces and backslashes correct.

  • YOG Profile Picture
    414 on at

    Hi Will,

    URL does not have any typo as i can see data when i paste URL in browser.

  • YOG Profile Picture
    414 on at

    Hi Rahul,

    I've tried in Dev box. I cannot see any event viewer log.

    Client secret is also active

  • WillWU Profile Picture
    22,361 on at
  • YOG Profile Picture
    414 on at

    Hi Will,

    I am aware of this and not using blackslash for resource. Issue remains same

  • Swathy Profile Picture
    10 on at

    Any updates on this? I am also facing the same issue.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 659 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 289 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans