# Azure SQL Server Configuration Prerequisites

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.

### Azure Active Directory User

1. Create a new user or use an existing user in Azure Active Directory.

{% hint style="info" %}
**Note:** Note down the *Principal Name* and *password* as it will be used later.
{% endhint %}

![](/files/6Pgrv6dDzmelTOVKBwE7)

### Creating a Service Principal

1. Create a service principal from the Azure Portal by navigating to Azure Active Directory and selecting *App Registrations*. Then, select *New Registration.*

![](/files/ynl3VC6h03EVnVYADFeL)

2. Provide the name of the new application and select *Accounts in this organizational directory only*

{% hint style="info" %}
**Note:** For *Redirect URI*, select *Public client/native (mobile & desktop)* or *Web* and provide [*http://localhost:8050/*](http://localhost:8050/).
{% endhint %}

Click *Register*.

![](/files/qnFCeXflzqngKUB7OEZl)

3. Write down the *Application (client) ID* for later use.

![](/files/HQi1w6Bjf40ttd7L9eEG)

4. 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.*

![](/files/qywM9tVUfWv4HGqwzhKX)

5. Select *Delegated permissions* and check *user\_impersonation*.

Click on *Add permission.*

![](/files/Hzb6GN0qTRY2dK8jv5dU)

### Provisioning Azure AD Admin for Azure SQL Server

1. Create an SQL Server by navigating to the SQL Server at Azure Portal.

{% hint style="info" %}
**Note:** Write down the Server name.
{% endhint %}

![07-Add](/files/wW8PaOy18ibiXkVKXqcT)

2. 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.*

![08-Set-Admin](/files/3zN0UYnV4KeMcrDvClPX)

All the above-mentioned steps will be used in configuring the Azure SQL Server connecter for Azure Active Directory (AAD) methods.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v10/connectors/azure-sql-server-configuration-prerequisites.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
