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

BC>SaaS>CodeUnit>Published soap service consume in c# get unauthorized

(1) ShareShare
ReportReport
Posted on by 130
Hi,
I have a custom Codeunit and published it as a web service (soap). Now I am trying consume this web service in C#, but it throws unauthorized 401.
Please advice.
 
Thanks
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,154 Most Valuable Professional on at
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,390 Super User 2025 Season 2 on at
    Hi,
     
    hope the following helps
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at
    This is still a certification issue. It is recommended that you test it in PostMan first. After passing it, you can directly convert it into C# code.
     
    Hope this can give you some hints.
    Thanks.
    ZHU
  • D365 Warrior Profile Picture
    130 on at
    Thanks everyone for your response.
    YUN ZHU, I can consume odata (Chart of account) using postman. One problem happening while trying to use custom developed codeunit published as service. while executing it throws

    {
        "error": {
            "code": "Internal_DataNotFoundFilter",
            "message": "The company \"CRONUS Inc\" does not exist.  CorrelationId:  ce4db0f8-4fed-410b-8046-b4d8b3152e00."
        }
    }
  • Verified answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at
    Hi, it looks like your company name has spaces in the middle and needs to be converted into a URL Name. Hope the following can give you some hints.
     
     
    Thanks.
    ZHU

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,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans