Skip to main content

Posts

Showing posts with the label Api

Update to OAuth in Dynamics Business Central v20

Introduction: In one of my blog on Setting up OAuth Authentication for Webservices and APIs in Dynamics Business Central, I shared how to setup OAuth Authentication. With Dynamics 365 Business Central releasing version 20, the Webservice Key Authentication has become OBSOLETE and all your integrations are to be moved to OAuth Authentication. There are few more steps in addition to the steps I mentioned in the blog above and those will be seen in the demonstration. Pre- requisites : Microsoft Dynamics 365 Business Central Understanding OAuth Authentication Understanding Azure App Registration Demonstration: 1. Complete all the Azure App Registration : Complete the Azure App Registration process as mentioned in the blog  Setting up OAuth Authentication .  2. Change the Redirect URL in Azure App Registration: Change the Redirect URL in Azure App Registration > Authentication to https://businesscentral.dynamics.com/OAuthLanding.htm 3. Azure Active Directory Application: In Bus...

Setting up OAuth Authentication for Business Central Web Services / APIs

Introduction: After upgrading Business Central to version 17 (Wave2 2020), I found that there was an error telling me that WebService Key is going to be deprecated soon. Web Service Access Key is deprecated. Hence, I decided to explore and probably make it easier through this blog. Pre- requisites : Admin Access to Office 365 Admin Access to Azure Demonstration: 1. App Registration on Azure Portal: To enable OAuth authentication for any apps in Azure Active Directory, you will need to perform App Registration and set up the permissions and security details. i.) Register the App: Search for 'App Registration' on the Azure Portal. Click on New Registration Type in the App Names, Account Types and Redirect URI. Registering Application ii.) Setup API Permissions: Go to API Permissions > Add Permissions > Business Central App > Select Delegated Permissions > Select Other Permissions and Financials > Add Permissions Button. Setup API Permissions iii.) Setup Client Secr...

Client Management in Business Central using AL Code

Introduction: Have you ever got into a requirement, where you are needed to actually execute the logic separately for different client types? Well, this blog is just going to discuss the ClientType DataType and different ways of getting ClientTypes and how to use it in your code. Pre- requisites : Microsoft Dynamics Business Central Online AL Language Extension VS Code References: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/session/session-currentclienttype-method https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/session/session-defaultclienttype-method https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/clienttype/clienttype-option Demonstration: ClientType: In order to understand how to use ClientTypes, we need to understand what ClientTypes represents. ClientType is an Option based DataType introduced in Business Central. That is in order to get ...