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...
Suggested Answer

Auth: System-to-System Connect

(9) ShareShare
ReportReport
Posted on by 66
We are attempting to authorize an Entra application we have created to access D365 with a System-to-System connection (we have a working flow with a user connection, but System-to-System is the preferred method).
 
We have created the Entra APP in Dynamics and given it the following permissions:
 
And the following permissions from the Entra end:
 
We are getting an access token, but when we try to actually request records, we get back an error response:
<error xmlns="http://docs.oasis-open.org/odata/ns/metadata"><code>Unauthorized</code><message>The credentials provided are incorrect</message></error>
 
What are we doing wrong?
 
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    303,669 Super User 2026 Season 1 on at
    Moved the question from the Dynamics 365 General to the Dynamics 365 Business Central forum.
     
  • Suggested answer
    NAV_with_Narang Profile Picture
    2,320 Moderator on at
    Hi AH-01101805-0,
     
    I do think you need confirm if you have selected OAuth2.0 in your power automate flow. System-to-System describes the purpose, not the method. Also while using https trigger, the BC APIs work
     
    Seems like your power automate flow is not generating the access token before passing it through to Azure
     
    Please also run a test in POSTMAN in calling the API first, before running in PA. https://yzhums.com/20690/
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    The error message is Unauthorized: The credentials provided are incorrect. So this is still a certification issue.
    I also suggest testing it in Postman first. Below is how to use OAuth in Power Automate, which I hope will give you some hints.
    Using OAuth 2.0 to connect Business Central APIs and Web Services in Power Automate – OAuth in HTTP action
     
    Thanks.
    ZHU
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,803 Super User 2026 Season 1 on at
    Hello,
     
    Use the client credentials flow and request the token for:
    https://api.businesscentral.dynamics.com/.default
    Make sure your Entra app has API.ReadWrite.All, Automation.ReadWrite.All, and app_access permissions, then use that token to call BC APIs.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,128 Super User 2026 Season 1 on at
    Have you checked the API using Postman? Is it working in Postman?
  • AriHeitner Profile Picture
    66 on at
    Hi @YUN ZHU @OussamaSabbouh @Khushbu Rajvi.  @NAV_with_Narang!
     
    Here are the same requests in POSTMAN.
     
    First, the auth request:
     
    You can see I am making a token request to the correct tenant, specifying the client_id and client_secret, which have been configured in Entra Applications as above with the permissions I showed above, and I am receiving back an access token.
     
    But when I make a request to get data - like the list of companies - I get back the message I showed before:
    You can see I am using the same token I received above.
     
    When I try the same request with a token obtained through a user login grant, I get correct results:
     
     
    What am I doing wrong?
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
    Hi,
     
    Why not just do both the process - Token Generation and GET Request - in one API request?
     
    Try the below approach -
    1. Add your GET Request URL.
    2. Go to Authorization, and select Type as OAuth 2.0.
    3. Add your configurations as mentioned below in screenshot. Replace with your Client ID and Client secret, and in the Access Token URL, add your Tenant ID.
    4. Click on Get New Access Token, and then click on Proceed, and then Use Token.
    5. Then just send the GET request, it will automatically use the token you just generated.
     
     
     
     
     
     
     
    Do mark it as verified if this helps.
    Aman K
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    I agree with Aman; I did the same in the discussion below.
    Using OAuth to connect Business Central APIs and Web Service in Postman
     
    Thanks.
    ZHU
  • AriHeitner Profile Picture
    66 on at
    @Aman Kakkar what value are you using for the SCOPE in your OAUTH request?
     
    I think that is missing from our OAUTH request and that may be part of the problem.
     
    thanks!
    Ari
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
     
    Here's the scope you need to use - https://api.businesscentral.dynamics.com/.default
     
    Do mark it as verified if this helps.
    Aman K

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,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans