Azure service principals (or App regs.) is nice secure way to connect to fx. a Azure SQL manage instance and then perform querys using PowerShell. This is an ideal alternativ to using a local Service Account. The upside to this is that you can authenticate with a secret or with a certificate that you create for yourself or the machine you are running your script(s) from.
SQL
Assign Azure SQL database permissions to AAD group
Intro
When you create an Azure SQL database (DB) right of the bat, you will be faced with the need to assign permission in the database to users or security groups. Normally on an on-premises SQL DB it’s no problem and can be done using the GUI in SSMS. But for an Azure SQL DB, there is no GUI to assign permissions, you will need to use SQL queries to assign permissions to users or groups. Let me show you how to assign SQL DB permissions to a AAD security group.
How to create a Azure SQL server and a Database
So I was asked today to provide my good friend and colleague Martin Bengtsson with an Azure SQL Database (DB) for project regarding reporting from Config manager using Power BI.
First thing first, you cannot just create a SQL DB azure, you need to have a SQL server – As-a-Service. Then you can create all the databases you need.