Skip to main content

Notifications

Announcements

No record found.

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

Access OData API with BC Container On Prem using Windows Auth and Web Access Key

Posted on by 5

Hello,

I'm unable to access the OData API endpoints for Business Central On Prem using Windows Authentication with the username and web access key as the password. I was able to get it working with NTLM however we need it to work with the web access key using Basic Authentication. When I try to query the API with the username and web accese key I get a 401 Unauthorized. This happens with both Postman and our Python application where I base64 encode the credentials into the Basic header  <username>:<web access key>.Using Postman I just enter in the username and web access keys to their fields after I select Basic Authentication.

I'm testing this with the Business Central docker container, but cannot get the API endpoints to accept my Basic Authentication. Should the web access keys still work for on prem BC instances and if so, is there a configuration I'm missing or are my headers/Postman requests formatted incorrectly?

Thank you

  • Dobby94 Profile Picture
    Dobby94 2 on at
    RE: Access OData API with BC Container On Prem using Windows Auth and Web Access Key

    Hey, I can say to you, that accessing nstserver:7048/.../ is working with domain\username and web service access key as a password on on-prem BC20 CU8. That is the basic auth. They want to deprecate it in future versions and use only OAuth2.

    See here: learn.microsoft.com/.../deprecated-features-platform

    And here: learn.microsoft.com/.../authenticate-web-services-using-oauth

    learn.microsoft.com/.../web-services-authentication

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans