How to Setup OAuth authentication in Business central for API

Posted On May 30, 2021 by Dynamics Infotech

You might have seen this message on the User card which says the Web Service Access key is being deprecated on Saas. … Continue reading

Please follow the below steps to generate OAuth for API.

1.login to Azure portal with ADMIN rights
2.Go to All Services and search for App registrations

3. Click New registrations
4. Give some registration Name, and provide the return URL like

5. Click Register
6. Note down the Application ID
7. Select API Permissions tab

8. Select Business central app from the list

9. Click Add permissions

10. Click on Certificates & Secrets and Click +New client secret

11. Select the option of client secret expiry, I selected 2 years and complete the form.
12. You will get Client Secret Value. Note this value as the Value will be masked later

13. Now, its time to test this in Postman application
14. Open Postman, Select Authorization Type = OAuth2.0, Keep Access Token blank as we will generate this now

15. Give some Token name BCAPP,
Call back URL =
Auth URL = /oauth2/authorize?resource=
Access Token URL = /oauth2/authorize?resource=
Client ID = Generated From previous steps
Client Secret value = Generated From previous steps
Select Add Authorization data to = Requests headers

16. Click Get New Access Token
17. You will get a pop-up window asking for Business central ID and Password
18. Enter the ADMIN ID and password which you have used in Azure directory in above steps
19. You should get sucess message. If you get an error message then ensure you have entered the Client ID and CLient secret correct.
20. You will get Access Token in Postman. Then you can use any API available in Business central and click SEND to test


Enter your email address to follow this blog and receive notifications of new posts by email.

  • Quick Tip – Enable/Show Activities on Notes in D365 CRM
  • Enabling Change Log in Business Central
  • Create Custom Recommendation on Form within Canvas Power Apps
  • Azure Synapse Analytics – How to ingest the Salesforce table data into a dedicated SQL pool using Notebook activity.
  • Use of shared shift in a store with two or more terminals in D365 for Retail

© All Rights Reserved | Dynamics Infotech