I'm building a an ASP.NET Core Web API that will consume some data entitie on Dynamics 365 F&O.
I've registered an APP on Azure and generated the neccessary credentials (client_id, client_secret, etc)
When i hit the endpoint directly from postman, this is what i get:
And when i use this access_token to make calls on the oData endpoint, i get a '200 OK' response:
Everything is fine up to this point.....
But ive wrapped the whole access token retrieval into a controller and when it hit the endpoint for this controller, i get access token...Cool!
But when i use the jwt token marked in black to make requests, i get a '401 unathorized' response, but despite checking from jwt.io, the token looks OK.
Someway somehow my token gets invalidated .
HAS ANYBODY FACED THIS ISSUE BEFORE???


Oyedepo OlufemiRank #4,270 · 354 reputationPosted Sep 9, 2019, 1:30 AM EDT
Abhijeet JadhavRank #349 · 7.2K reputationPosted Sep 6, 2019, 6:45 AM EDT
Oyedepo OlufemiRank #4,270 · 354 reputationPosted Sep 6, 2019, 6:49 AM EDT
Abhijeet JadhavRank #349 · 7.2K reputationPosted Sep 6, 2019, 7:15 AM EDT
Oyedepo OlufemiRank #4,270 · 354 reputationPosted Sep 6, 2019, 7:25 AM EDT
Dharmesh SharmaRank #1,974 · 741 reputationPosted Sep 6, 2019, 10:18 PM EDT
Oyedepo OlufemiRank #4,270 · 354 reputationPosted Sep 7, 2019, 4:21 AM EDT
Abhijeet JadhavRank #349 · 7.2K reputationPosted Sep 7, 2019, 5:41 AM EDT
Oyedepo OlufemiRank #4,270 · 354 reputationPosted Sep 7, 2019, 8:21 AM EDT
Dharmesh SharmaRank #1,974 · 741 reputationPosted Sep 9, 2019, 1:25 AM EDT