web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,386 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,774 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,515

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans