Thursday, February 22, 2024

Enable API App in Microsoft Entra Application card

 In order to connect connect to BC through API, we also need to to enable application in Microsoft Entra Application Card and provide the User Permission sets.


Client id= Application ID from Azure portal









Saturday, September 25, 2021

Add non-inventory items on requisition and planning worksheets in Business central

 With the release of Business central Wave2, now it is possible to create Requisition and Planning worksheets for Non-Inventory Item.

Click the below link to know more:

Add non-inventory items on requisition and planning worksheets | Microsoft Docs


Friday, September 24, 2021

Account Type or Bal. Account Type must be a G/L Account or Bank Account.

While posting FA G/L Journal , I encountered the below error. which says: Account Type or Bal. Account Type must be a G/L Account or Bank Account.


  1. I am trying to Acquire a new Fixed Asset and passing the Acquisition Entry from FA G/L Journal
  2. On the Debit Side, I have the new Fixed Asset and on Credit side, I have a Vendor
  3. And I realized it is not working and throwing error. So, how to solve this error
  4. Solution: I created the 2nd line entry for Credit side, which is Vendor and this has worked.




Tuesday, August 17, 2021

Business central 2021 Release Wave 2- What's new ?

 Remove obsolete reports 204, 205, 206, and 207 

Below reports are being deprecated. Public Preview from Sept 2021.


Remove obsolete reports 204, 205, 206, and 207 | Microsoft Docs


Enabled forPublic previewGeneral availability
Users, automaticallySep 2021Oct 2021

Deprecated reportRecommended report
204 Sales - Quote1304 Sales - Quote
205 Order Confirmation1305 Sales - Confirmation
206 Sales - Invoice1306 Sales - Invoice
207 Sales - Credit Memo1307 Sales - Credit Memo

Sunday, May 30, 2021

How to Setup OAuth authentication in Business central for API

 

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







Please follow the below steps to generate OAuth for API.

  1. login to Azure portal https://portal.azure.com/ 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 https://businesscentral.dynamics.com


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 = https://businesscentral.dynamics.com
Auth URL = https://login.windows.net/<tanant ID here>/oauth2/authorize?resource=https://api.businesscentral.dynamics.com

Looks like step #15 is changed so try this URL: Auth URL : https://login.microsoftonline.com/a34f8ecc-bb42-4bcf-b12a-798d0109d2af/oauth2/authorize?resource=https://api.businesscentral.dynamics.com

Access Token URL = https://login.windows.net/<Tenant ID here>/oauth2/authorize?resource=https://api.businesscentral.dynamics.com

Try Access Token URL =https://login.microsoftonline.com/a34f8ecc-bb42-4bcf-b12a-798d0109d2af/oauth2/token?resource=https://api.businesscentral.dynamics.com

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