Skip to main content

Notifications

Announcements

No record found.

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

Businness Central 401 unauthorized access

Posted on by 5

I need access to web services provided by an installation of Business Central on Premise. BC is installed on a windows server 2022 without domain (no active directory present).

Attempts to log in via SoapUI return the 401 Unauthorized.

I also tried to access through an application written in C that uses the gSoap libraries and I get the same message:

Error 401 fault: SOAP-ENV:Server [no subcode] 
"HTTP Error" Detail: HTTP/1.1 401 Unauthorized

Instead if I try to access via the following powershell script:

$username = "myUser"
$password = "MyPasswd"

$URI = "http://localhost:8012/ERP/WS/Vendor/Page/SalesOrder"
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))
$WSProxy = New-WebServiceProxy -Uri $URI -Credential $cred
$WSProxy.ReadMultiple($null, "", 0)

access is granted and I keep the response data provided by Business Central.

What do I have to configure in Business Central, in an on-premise installation without a Windows domain, to guarantee access to soapUI (or an application developed using gSoap) ?

  • Fra A. Profile Picture
    Fra A. 5 on at
    RE: Businness Central 401 unauthorized access

    I don't have "Azure Active Directory Application Card", it is a stand alone server.

    Also I don't understand why via powershell I have no problem, while on the same machine I can't login with SoapUI or gSoap.

  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Businness Central 401 unauthorized access

    I think in this case you need to provide the access permission int your Azure Active Directory Application Card, check it.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans