Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Call dynamics service ...
Finance forum
Suggested answer

Call dynamics service from postman -status :Unauthorized --- body

Posted on by 10
Hi Everyone,
 
I have followed couple of blogs for creating Custom Service, Postman create token

https://dynamics365musings.com/setup-postman-to-call-d365-data-entities/
 
 
Token generated successfully but while pulling data from Customer Webservice it throws me error
 

{
    /Message/: /Authentication failed./,
    /StackTrace/: null,
    /ExceptionType/: /System.InvalidOperationException/
}

Attaching the screenshot for the same.

Let me know what i missed ?

Thanks all!

  • CU09050607-0 Profile Picture
    CU09050607-0 10 on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi Anthony,
     
    I was able to generate the access token previously
     
    when i tried to get any standard API it shows the same error.
     
    In the Azure Active Directory F&O  i have set the client id and set the user as admin.
    in App registration all the API permission is given with respect to D365 
     
    The same webservices if i open it from browser it works but from postman it stills throw the same error.
     
    Is it some issue with postman or any permission related or any credentials that I failed to add.
     
    Let me know.
     
  • Anthony Blake Profile Picture
    Anthony Blake 862 on at
    Call dynamics service from postman -status :Unauthorized --- body
    If you get the same response using my postman project - share your App reg permissions and D365 Entra ID Applications in the System Admin Menu
  • Suggested answer
    Anthony Blake Profile Picture
    Anthony Blake 862 on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi,
     
    I have a working public postman project with customer examples, try it out and check the requests against your own:
     
     
     
     
    (sorry, previous answer was on wrong sign-in)
    Anthony
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 3,081 Super User on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi CU,
     
    Follow my blog article and you should be able to get a token successfully and call odata.
     
    If you still find any issues, then please let me know.
     
    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future.
  • Suggested answer
    AB-10051525-0 Profile Picture
    AB-10051525-0 9 on at
    Call dynamics service from postman -status :Unauthorized --- body
    (replaced - wrong login)
  • Waed Ayyad Profile Picture
    Waed Ayyad 2,526 on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi,
     
    Can you share the headers tab when you 're calling the entity?
     
     
    Thanks,
    Waed Ayyad
     
  • CU09050607-0 Profile Picture
    CU09050607-0 10 on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi Judy

    i checked my client id and client secret and token is getting created successfully.
     
    I tried to get the customer -API using bearer token and paste that value


    It still shows the same error.
     



    Thanks
  • Suggested answer
    Judy Profile Picture
    Judy Microsoft Employee on at
    Call dynamics service from postman -status :Unauthorized --- body
    Hi, in Access token request, you would have mentioned a CLIENT ID. This has to be set up in FO as well. Go to System Administration -> Set up -> Azure active directory.
    Hope it helps.
    Best Regards,
    Judy

Helpful resources

Quick Links

Upcoming TechTalk: Copilot Capabilities…

Review the Copilot features that are currently available in Dynamics 365 Finance…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,377 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans