Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

How to Get sales Invoices Details

Posted on by 32

Hi All,

I am trying to execute Get Sales Invoice API . below is the URL

api.businesscentral.dynamics.com/.../companies(CRONUS International Ltd.)/salesInvoices(102001)

passing in header Authenticate - Bearer AccessToken

Getting response kindly help why it's giving error

    <code>Unauthorized</code>
    <message>The credentials provided are incorrect</message>
</error>
  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: How to Get sales Invoices Details

    Great.

  • Suggested answer
    Sliver Profile Picture
    Sliver 32 on at
    RE: How to Get sales Invoices Details

    Hi Nitin,

    I managed to solve the problem. Everything was proper and an access Token was also generated. the issue was with scope. I was giving the wrong scope that was the reason my access token was not working

  • Verified answer
    Sliver Profile Picture
    Sliver 32 on at
    RE: How to Get sales Invoices Details

    Hi Mohana,

    I managed to solve the problem. Everything was proper and an access Token was also generated. the issue was with scope. i was giving wrong scope that was the reason my access token was not working

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: How to Get sales Invoices Details

    Hi,

    Did you setup a Azure Active directory in BC to create a new card with the client Id you made through app registration in Azure?

    pastedimage1676864041891v1.png

    Thanks

  • Sliver Profile Picture
    Sliver 32 on at
    RE: How to Get sales Invoices Details

    Hi Mohana

    Yes i am trying with Authorization - Bearer AccessToken

    .. No luck same error coming

    I m trying below api

    learn.microsoft.com/.../dynamics_salesinvoice_get

    What could be the problem

    ashish

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,133 Super User 2024 Season 2 on at
    RE: How to Get sales Invoices Details

    Did you try Authorization - Bearer AccessToken

  • Sliver Profile Picture
    Sliver 32 on at
    RE: How to Get sales Invoices Details

    Hi Mohana

    api.businesscentral.dynamics.com/.../companies

    If i try this with access token . result is same

    <error xmlns="docs.oasis-open.org/.../metadata">

       <code>Unauthorized</code>

       <message>The credentials provided are incorrect</message>

    </error>

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,133 Super User 2024 Season 2 on at
    RE: How to Get sales Invoices Details

    try with only api.businesscentral.dynamics.com/.../companies

  • Sliver Profile Picture
    Sliver 32 on at
    RE: How to Get sales Invoices Details

    Hi Mohana

    Thanks for reply

    Yes I got the access Token and testing in Postman

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,133 Super User 2024 Season 2 on at
    RE: How to Get sales Invoices Details

    Did you setup OAuth and got the AccessToken?

    I hope you are testing in Postman

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans