/sql-auth-with-aad-sample

Code for a blog series on using Service Principals, Key Vault Certificates, and SQL Authentication

Primary LanguagePowerShell

Service Principals, Key Vault, and SQL Azure Sample

This repository contains sample code and scripts on how to:

  • Create an Azure AD Service Principal
  • Create a self-signed certificate in Key Vault and add it as an authentication mechanism to the Service Principal
  • Configure Azure SQL for Active Directory Authentication
  • How to create an Azure Web App that uses Token-based authentication to connect to an Azure SQL Database by authenticating with the Key Vault certificate.
  • How to authenticate users of the Web App using Azure AD and delegate their credentials to Azure SQL DB.

The following posts describe the sample in detail: