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

How to set Basic Authentication in C# ASP.NET (NavUserPassword) - Consuming Business Central On-Premise SOAP URL

(0) ShareShare
ReportReport
Posted on by 40

Hello everyone,

Lately, I've been working on a web application that consumes Business Central APIs. (from a SOAP URL)

The code that I wrote worked just fine before changing the Credential Type from Windows to NavUserPassword (in order to consume APIs with Basic authorization)

pastedimage1638782814823v1.png

But then, (after I changed to NavUserPassword) it started given me a server error (HTTP status 401: Unauthorized)

pastedimage1638782980380v2.png

I did some research about how to set username and password in a header property or something and I found some solutions but none of them worked for me,

Can anyone help me solve this please

Thanks.

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

  • Verified answer
    medzem Profile Picture
    40 on at

    Okay, Thank you so much Marco

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