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: