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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Permission requirements for Web Services access

(0) ShareShare
ReportReport
Posted on by 95

Hi people.

I'm having difficulty setting up a web service to connect with Hubspot.  I've created a new Webservice but when I try to access the ODATA v4 URL I get the following response.

  {"error":{"code":"Authentication_InvalidCredentials","message":"The server has rejected the client credentials.

For clarity, the API exposes Page 21 (Customer Card)

Can someone point me in the right direction as to the correct user permission or permission set I require to set this up properly?

Appreciate anyone who can point me in the right direction!
Thanks.
Chris.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Permission requirements for Web Services access

    Hi,

    Can you please confirm How you are testing your API in which application?

    Also what kind of authentication you are using to validate the BC Api?

    Thanks.

  • chris_7777au Profile Picture
    95 on at
    RE: Permission requirements for Web Services access

    Hi Nitin.

    I was following the the instructions found here.:

    docs.microsoft.com/.../publish-web-service

    I created the web service (Object Type - Page, Object ID = 21 (Customer Card)) and published.  I got this process from Hubspot but it's consistent with the Microsoft documentation.  I was having errors when I copied the ODATA V4 URL into the hubspot page to connect things up, so I grabbed the URL and copied it in directly to a browser.  A pop up requests my user & password (which I enter) and then I get the error.  

    Something to note - we have Microsoft endpoint security enabled with device management (i.e. my account can only log in from recognised registered devices).  Not sure if this has something to do with credentials being rejected.  

    I haven't played too much with web services and I recognise our security may create some complexity.  Within BC I'm a super user but that may not mean I have assigned myself the specific privileges required to allow Web Services (this privilege set isn't well documented by Microsoft).  

    Any ideas?

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    RE: Permission requirements for Web Services access

    Hi chris_7777au ,

    Can you please confirm are you putting the User id and password in the URL when running from web browser?

    the user name would be the BC login user name without any domain

    and the password would be your Web service key from the user card see the image below:

    pastedimage1653961868620v1.png

  • Suggested answer
    MahGah Profile Picture
    15,529 on at
    RE: Permission requirements for Web Services access

    Hi

    I always use Postman to test my API/ODATA before add it to any other software. it is the sure way to make sure API is functional and works properly. I recommend reviewing following posts.

    https://yzhums.com/18869/

    https://yzhums.com/20690/

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

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans