How to Provision an Azure SQL Database With Active Directory Authentication

In this article, we will talk about how to provision an Azure SQL Database with authentication restricted to Active Directory users/groups/applications. We will use Pulumi to do that.

Why This Article?

In a previous article, I already talked about connecting to an Azure SQL Database using Azure Active Directory authentication. However, my focus was on querying an Azure SQL Database from C# code (from an ASP.NET 6 Minimal API that was using Microsoft.Data.SqlClient "Active Directory Default" authentication mode, to be more precise), and not on the configuration of the Azure AD authentication itself.

ASP.NET Core 3.0 Blazor CRUD With Azure SQL

Introduction

Blazor is one of the latest trending stacks among developers, specifically Cloud developers. In this video, I will be presenting you with how to connect an ASP.NET Core 3.0 Blazor C# application to an Azure SQL database using Visual Studio 2019.

Prerequisites

  • A valid Azure subscription or Azure free account. 
  • Visual Studio 2019.
  • Zeal to learn.

Watch

                 

system_health Extended Events in Azure SQL Database

The system_health Extended Events session is incredibly useful. Further, it's running, by default, in every server you have under management that is 2008 or greater. Things are not the same in Azure though.Image title

system_health in Azure SQL Database

If you look at the documentation for system_health, it shows that it's applicable to Azure SQL Database. However, if you try to run the example query, it won't work. This is because the implementation of Extended Events inside Azure SQL Database is a little different. Instead, you need to use the Azure SQL Database equivalent system views to create the same query like this: