Before the Azure SQL Server Provider can be configured and used for Azure Active Directory (AAD) methods, there are certain prerequisites that must be followed.
Create a new user or use an existing user in Azure Active Directory.
Note: Note down the Principal Name and password as it will be used later.
Create a service principal from the Azure Portal by navigating to Azure Active Directory and selecting App Registrations. Then, select New Registration.
Provide the name of the new application and select Accounts in this organizational directory only
Note: For Redirect URI, select Public client/native (mobile & desktop) or Web and provide http://localhost:8050/.
Click Register.
Write down the Application (client) ID for later use.
Add new permissions for Azure SQL Database by navigating to the API permissions and clicking Add a permission.
Select APIs my organization uses and search for Azure SQL Database.
Select Delegated permissions and check user_impersonation.
Click on Add permission.
Create an SQL Server by navigating to the SQL Server at Azure Portal.
Note: Write down the Server name.
Set an admin by navigating to Azure Active Directory in settings.
Click Set Admin and search for the user (existing or new) in Azure Active Directory. Then Click Select.
All the above-mentioned steps will be used in configuring the Azure SQL Server connecter for Azure Active Directory (AAD) methods.