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 :
Small and medium business | Business Central, N...
Answered

Odata HTTP Error 400

(0) ShareShare
ReportReport
Posted on by 45

I am trying business central 2019 release wave 2 Version: NA Business Central 15.5 (Platform 15.0.41893.0 + Application 15.5.41926.0)

i can see web services list from the default install and can click on the OData link. It opens and ask for password

Sampel URL

192.168.88.103:7048/.../ItemSalesByCustomer

I have tried 2 kinds of password

  • AD User password (also used to login to Business Central, so I know that the combination of user and password is valid)
  • Web Service Key

both give HTTP Error 400

Tried to open the the URL in Postman, also gives error HTTP 400

Where can i start to check what is wrong? Is it because I am using evaluation license?

I have the same question (0)
  • Suggested answer
    Rehan Satti Profile Picture
    634 on at

    Hi,

    Search Users in tell-me. Open your user and copy your user name and web-access key if you have, other wise you can generate it from the action menu. Then you are good to go

    pastedimage1587212087034v1.png

  • Hendry_Leo_Yes248 Profile Picture
    45 on at

    Hi Rehan,

    i have tried that combination without any luck

    where can we see the log file for this kind of problem

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    OData error 400 does mean Bad Request which does mean the the call in itself not correct. Could it be that there are duplicates (same names) or something else is not correct. Does the issue also happen with the standard OData url within standard company?

    401 does mean unauthorized. Then you do need to look at users, permissions and passwords or keys.

    Thanks.

  • Hendry_Leo_Yes248 Profile Picture
    45 on at

    Hi Marco,

    It is also happening with Sample Company (CRONUS)

    I know that it is not 401

    Any idea where to look for log file?

    Regards

    Hendry Leo

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    I would start with looking at the application event log file and / or debug the url with Fiddler. From the looks of it, this is an OnPrem installation.

    Download:

    www.telerik.com/.../fiddler

    Configure it to decrypt ssl traffic, in Fiddler select Tools, Options, HTTPS, select Decrypt HTTPS traffic, and the other two options are optional, OK:

    Select Tools, Win8 Loopback Exceptions (I did select all, but that is probably an overkill), Save Changes.

    For assistance with the Fiddler analysis, please do raise a support request to Microsoft Support via your CSP or Dynamics partner.

    Thanks.

  • Hendry_Leo_Yes248 Profile Picture
    45 on at

    Hi Marco,

    This is fiddler capture for the request

    GET /BC150/ODataV4/Company('CRONUS%20Canada%2C%20Inc.')/ItemSalesByCustomer HTTP/1.1

    Host: win-4qbfsna3448:7048

    Connection: keep-alive

    Cache-Control: max-age=0

    Authorization: Digest username="REMOVED", realm="Digest", nonce="+Upgraded+v177a8ff753d99812bedb1b8f15f5914180ad5d1f17e17d60154e8ae85c32b5941468e25834df855dc03adda9318e04b24b04e71ed4298fa85", uri="/BC150/ODataV4/Company('CRONUS%20Canada%2C%20Inc.')/ItemSalesByCustomer", algorithm=MD5-sess, response="c51f09012b9cb2d8379a10d0ebcea70b", qop=auth, nc=00000002, cnonce="f81c8604019ce171"

    Upgrade-Insecure-Requests: 1

    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

    Accept-Encoding: gzip, deflate

    Accept-Language: en-US,en;q=0.9

    Cookie: SignInCookie=True

    Does it looks correct ?

    should authorization set to be basic or digest?

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    NOTE: I moderated your post by removing the username from the log. For assistance with the Fiddler analysis, please do raise a support request to Microsoft Support via your CSP or Dynamics partner.

    I ran a Fiddler trace myself and it should show the following:

    Authorization: Basic ZXVyb3BlXG1tZWxzOk1pam5tc2Z0MTk3NC4=

    My service tier is configured with NavUserPassword and my WebClient instances are always configured with AccessConrolService.

    Note that with Edge / Chrome browser, you need to add a loopback excemption otherwise the test on the machien will not exceed though it does work out of the box with IE:

    github.com/.../338

    I usually configue this via Fiddler, Tools Win8 Loopback excemptions.

    With Chrome, you can use the ODataV4 url link. For IE it also OK to use OData (V3) url.

    Hope it does help.

  • gert-jan.terschure Profile Picture
    200 on at

    You need either basic or oauth authentication. Also make sure that OData is enabled in the instance settings.

  • Hendry_Leo_Yes248 Profile Picture
    45 on at

    OData is enabled in instance setting

    Where can we tell if OData is using basic or oauth authentication?

    I tried selecting Basic Authentication for IIS, but i doubt it will help

  • gert-jan.terschure Profile Picture
    200 on at

    The OData service is a WCF Service bound on port 7048. IIS doesn't need to be touched unless you want to use URL Rewrite. You can leave it on anonymous as the ACS deals with it.

    When connecting with PostMan you need to change the Authentication to "Basic" and enter your username and web access key.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans