Impulz Technologies LLC

Menu
  • Home
  • Products
    • IMPULZ Positive Pay
    • IMPULZ Product unlock
  • Solutions
    • Microsoft Dynamics 365 Finance & Supply Chain Management
    • Microsoft Azure
    • Microsoft Power Platform
      • Power BI
      • Power Apps
  • Services
    • Application Support And Maintenance
    • Azure Cloud Services
    • ISV Development
    • Project Resources
  • About Us
  • Blog
  • Clients
  • Contact Us

Impulz Technologies LLC

Connect the Angular with a Microsoft Dataverse using Web API – Part 2 of 3

  • Home
  • Blog
  • Dynamics 365
  • Connect the Angular with a Microsoft Dataverse using Web API – Part 2 of 3
  • January 23, 2023January 24, 2023
  • Ahmad Hussain

Angular Dataverse

Hi, you are welcome to another informative blog post of Impulz Technologies LLC. This is the second part of the series of blog posts in which I am going to explain how to fetch the data from the Dataverse in a single page application (Angular application in our case).

Quick Recap

In the previous blog post I have explained the following:

  1. How to register an application in Microsoft Azure.
  2. How to setup API permissions in Microsoft Azure.

You can read the previous blog post from this link.

What you expect from this blog post?

In this second part of the blog posts series, I am going to explain how the Microsoft Azure Active Directory (Azure AD) authentication and authorization works and what are the available library/package options available from the Microsoft.

Accessing the resource like Dataverse web API from Azure, involves two steps – Authentication and Authorization.

Authentication vs Authorization

Authentication is the process of proving that you are who you say you are. This is achieved by verification of the identity of a person or device. Microsoft Azure AD uses OpenID Connect Protocol to authenticate the user or the device identity. Upon successful authentication the identity provider, which is Azure AD, is going to issue the identity token. The format of the identity token is JSON Web Token or simply JWT.

Authorization is the act of granting an authenticated party permission to do something. It specifies what data you’re allowed to access and what you can do with that data. The Microsoft Identity Platform uses OAuth 2.0 Protocol for the authorization. Upon successful authorization completion, Microsoft Azure AD issues the access token. The format of the access token is not standard.

There is a good tutorial exists on YouTube which explains the difference between Authentication and Authorization in the context of Azure as an identity platform.

The good is that Microsoft has developed and published a Microsoft Authentication Library which does the hard-work for you and the app developers don’t need to spend time in understanding the underlying protocols.

App types and Authentication Flows

There can be multiple types of application requiring authentication through Azure AD. Apps can be web applications hosted under a secure server environment, browser based app just like ours, mobile apps, desktop apps etc. Authentication and authorization can be performed using different flows for different application types.

In case of an Angular app, our browser is going to create a secure session with Azure AD and authenticate and authorized the Microsoft identity (corporate or school accounts in our case) to gain access to the Dataverse database.

MSAL-JS

MSAL-JS is a library available on JS package manager such as NPM. Through MSAL-JS we are going to perform the single sign-on of the user and fetch the ‘Accounts’ data from the Dataverse. First you need to install the MSAL-JS. You can install it through NPM by using the following command:

npm i @azure/msal-browser

In the next part and final part of this blog post series, I am going to explain the code layout and various configurations within the code. I am going to publish the final code on GitHub.

About Impulz Technologies LLC

Impulz Technologies, is a Silver Certified Microsoft Partner company. We specialize in the implementation, consulting and development of Microsoft Dynamics and Microsoft Power Platform. Impulz Technologies also provide staff augmentation services all across the US. For more information please contact us at 630-540-6302 or email us at info@impulztech.com

Posted in Dynamics 365, Microsoft Azure, Microsoft DataverseTagged Azure, Azure AD, D365, Dataverse

Recent Posts

  • 3 things you must consider when doing the data upgrade from AX2012 to Dynamics 365
  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012

Recent Comments

No comments to show.

Archives

  • February 2025
  • April 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • April 2023
  • February 2023
  • January 2023
  • October 2022
  • September 2022
  • August 2022
  • July 2022

Categories

  • Business
  • Data upgrade
  • Dynamics 365
  • Dynamics 365 Finance and Supply Chain
  • Dynamics AX 2012
  • Introductions
  • Microsoft Azure
  • Microsoft Dataverse
  • Microsoft Power Platform
  • New Technologies
  • Power BI
  • Uncategorized

Latest Post

  • 3 things you must consider when doing the data upgrade from AX2012 to Dynamics 365
  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012

Tags

Auto Cost Automation Ax2012 Azure Azure AD Azure Databricks Azure Data Factory Azure Synapse Cost Accounting D365 D365 code management D365 FO Azure DevOps Dataverse Development DevOps Duty Dynamics 365 Finanace and Operations development VM Dynamics 365 Finance and Operations Dynamics 365 Finance and Supply Chain Dynamics 365 FO Security Dynamics 365 with git Dynamics Lifecycle Services Export Freight Full Sync errors Import Item Cost Allocation Landed Cost Lifecycle Services Microsoft Azure Microsoft Dataverse Microsoft dynamics Microsoft Dynamics 365 Microsoft Dynamics 365 Commerce Microsoft Dynamics 365 Finance and Operations Microsoft Dynamics 365 version control Model Driven Apps Power Apps Power Platform Shipment SQL Error Transportation Voyages Web APIs XDS Framework
© Impulz Technologies - All right reserved.