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.
Using API-driven user provisioning with an Azure SQL database as a source of truth
Automating API-Driven User Provisioning with an Azure SQL Database. This post guides you through setting up an Azure SQL database and, integrating it with your HR system’s API, and then automating user creation and updates in Active Directory using API-driven provisioning to on-premises Active Directory