> For the complete documentation index, see [llms.txt](https://newdocs.keeper.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://newdocs.keeper.io/en/keeperpam/privileged-access-manager/keeperdb/entra-id-authentication-for-azure-sql.md).

# Entra ID Authentication for Azure SQL

Connect to Azure SQL databases with Microsoft Entra ID instead of a stored password

Users can connect to Azure SQL databases with their Microsoft Entra ID account instead of a stored password.

## Sign in from KeeperDB Desktop

KeeperDB Desktop (v2.3.0 or later) connects to Azure SQL with Entra ID directly. No Gateway, app registration or Vault setup is needed. Users must still exist in the database as Entra users.

1. Create a SQL Server connection and enter the Azure SQL host and database.
2. Click **Advanced…** and set **Authentication** to **Azure AD Token (Entra ID)** and click **OK**.
3. Click **Sign in with Microsoft** and complete sign-in with your Microsoft account in the browser tab that opens.
4. Click **Connect**.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2Fmdi4RZiMvdwWiiycX515%2FScreenshot%202026-10-08%20at%201.36.02%E2%80%AFPM.png?alt=media&amp;token=f22c28e3-0abc-4f2e-b29b-ee591338ca5a" alt=""><figcaption></figcaption></figure>

To use a token instead, paste an Entra ID access token for Azure SQL into **Access Token**.

## Sign in from the Keeper Vault

In order to connect to an SQL Server with Entra ID authentication, the App Registration must be configured for the Keeper Gateway, and the PAM Database must be configured to support the Entra ID auth option.

### Prerequisites

* Ensure you are using Keeper Gateway **v1.9.0** or later
* The [PAM Database](/en/keeperpam/privileged-access-manager/getting-started/pam-resources/pam-database.md) record must be configured under a PAM Configuration for an [Azure configuration](/en/keeperpam/privileged-access-manager/getting-started/pam-configuration.md#azure-environment) environment with the Client ID, Tenant ID and Client Secret set.
* The Azure App Registration has [API Permissions for SQL Database Authentication](/en/keeperpam/privileged-access-manager/getting-started/pam-configuration/azure-environment-setup.md#api-permissions-for-sql-database-authentication) enabled per the instructions.

### Step 1: Enable Entra ID on the PAM Database record

Edit the record → **PAM Settings** → **Connection** → **Authentication Methods**:

* **Allow Entra ID Authentication** (enabled by default when Azure PAM configuration is selected)
  * **Use browser session token**: users sign in through a Microsoft pop-up (MFA supported)
  * **Allow user to paste a token**: users paste an access token they got themselves
* **Entra ID — Username & Password (Legacy)**: signs in with the record's Launch Credential, which must be an Entra account. This method doesn't support MFA.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FGbV5ZWlHNFjmlWl4L0mN%2FScreenshot%202026-10-08%20at%201.32.34%E2%80%AFPM.png?alt=media&amp;token=21317f4f-7aea-418f-ab81-e1012a619924" alt=""><figcaption></figcaption></figure>

### Step 2: Connect

Launch the connection and choose **Sign in with Entra ID** from the credential dropdown. The Web Vault opens Microsoft sign-in in a pop-up, so allow pop-ups for the Vault. To use the other methods, choose **Enter Entra ID Token** or a credential under **Launch Credentials — Entra ID (Legacy)**.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F03Omdu0xQU1ERqoEaEcB%2FScreenshot%202026-10-08%20at%201.44.01%E2%80%AFPM.png?alt=media&amp;token=9bff92c8-3cb1-4bde-a725-0fe238ff8ddc" alt=""><figcaption></figcaption></figure>

## Common Sign-in Errors

| Error                         | Fix                                                                                              |
| ----------------------------- | ------------------------------------------------------------------------------------------------ |
| AADSTS500113 / AADSTS50011    | The redirect URI is missing or doesn't match. Add the URIs from Requirements.                    |
| AADSTS9002326 / AADSTS9002327 | The redirect URI is registered under the wrong platform. Move it to **Single-page application**. |
| AADSTS650057                  | Add the Azure SQL Database `user_impersonation` permission and grant admin consent.              |
| AADSTS7000218 (Legacy)        | Add a client secret to the Azure PAM Configuration.                                              |
| AADSTS50076 (Legacy)          | The account requires MFA, which the Legacy method can't satisfy. Use **Sign in with Entra ID**.  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://newdocs.keeper.io/en/keeperpam/privileged-access-manager/keeperdb/entra-id-authentication-for-azure-sql.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
