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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Web service call failed because user could not be authenticated or authorized

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I would like to share this information with all of you

Issue Summary:

if you are calling the Business Central REST API via OAuth2 authentication fails with the error message "Web service call failed because user could not be authenticated or authorized."

and in the event viewer, you got this warning 

pastedimage1673250084984v1.png

RCA:

When you create the APP reg in the Azure portal and add the needed params to your postman or any tool that you used to generate the token, the token is generated correctly

If you take this token and use this link: JSON Web Tokens - jwt.io 

This link is very helpful to show you the token data added so you will find it missing an important part which is ( Roles )

pastedimage1673250270542v2.png

This issue related to the wrong scope added to the request being wrong

pastedimage1673250386816v4.png

It should be https://api.businesscentral.dynamics.com/.default

I have the same question (0)
  • Verified answer
    Microsoft Dynamics 365 Business Central Profile Picture
    Microsoft Employee on at

    not a question

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans