Tutorial: Enable Azure Active Directory simply authentication with Azure SQL

APPLIES TO: Azure SQL Database Azure SQL Managed Instance

This article guides y'all through enabling the Azure AD-simply hallmark feature within Azure SQL Database and Azure SQL Managed Example. If you lot are looking to provision a SQL Database or SQL Managed Instance with Azure Advertizement-only authentication enabled, see Create server with Azure AD-only hallmark enabled in Azure SQL.

In this tutorial, you learn how to:

  • Assign office to enable Azure Ad-only hallmark
  • Enable Azure AD-only authentication using the Azure portal, Azure CLI, or PowerShell
  • Bank check whether Azure Advertisement-just hallmark is enabled
  • Exam connecting to Azure SQL
  • Disable Azure AD-only hallmark using the Azure portal, Azure CLI, or PowerShell

Prerequisites

  • An Azure AD instance. For more information, see Configure and manage Azure AD authentication with Azure SQL.
  • A SQL Database or SQL Managed Instance with a database, and logins or users. Come across Quickstart: Create an Azure SQL Database single database if you oasis't already created an Azure SQL Database, or Quickstart: Create an Azure SQL Managed Instance.

In order to enable or disable Azure AD-just authentication, selected congenital-in roles are required for the Azure Advertisement users executing these operations in this tutorial. We're going to assign the SQL Security Manager role to the user in this tutorial.

For more than data on how to assign a office to an Azure Advertizing account, run into Assign administrator and not-administrator roles to users with Azure Active Directory

For more information on the required permission to enable or disable Azure AD-merely authentication, see the Permissions section of Azure AD-only authentication article.

  1. In our example, nosotros'll assign the SQL Security Manager function to the user UserSqlSecurityManager@contoso.onmicrosoft.com. Using privileged user that can assign Azure Advert roles, sign into the Azure portal.

  2. Go to your SQL server resource, and select Access control (IAM) in the menu. Select the Add together button and then Add together role consignment in the drop-downwards menu.

    Access control pane in the Azure portal

  3. In the Add role assignment pane, select the Office SQL Security Director, and select the user that you want to accept the ability to enable or disable Azure AD-simply authentication.

    Add role assignment pane in the Azure portal

  4. Click Save.

  • Portal
  • The Azure CLI
  • PowerShell

Enable in SQL Database using Azure portal

To enable Azure AD-only authentication auth in the Azure portal, see the steps below.

  1. Using the user with the SQL Security Manager role, get to the Azure portal.

  2. Go to your SQL server resource, and select Azure Agile Directory under the Settings menu.

    Enable Azure AD only auth menu

  3. If you haven't added an Azure Active Directory admin, you'll need to set this earlier yous can enable Azure Advertizement-only authentication.

  4. Select the Support only Azure Active Directory authentication for this server checkbox.

  5. The Enable Azure Advertizing authentication only popup volition show. Click Yes to enable the feature and Save the setting.

Enable in SQL Managed Case using Azure portal

To enable Azure Ad-only authentication auth in the Azure portal, see the steps below.

  1. Using the user with the SQL Security Manager part, go to the Azure portal.

  2. Get to your SQL managed example resources, and select Agile Directory admin under the Settings card.

  3. If you haven't added an Azure Active Directory admin, yous'll need to prepare this before you can enable Azure AD-only hallmark.

  4. Select the Support but Azure Agile Directory hallmark for this managed instance checkbox.

  5. The Enable Azure Advertising authentication simply popup volition show. Click Yep to enable the characteristic and Save the setting.

Check whether Azure AD-only hallmark is enabled for your server or case.

  • Portal
  • The Azure CLI
  • PowerShell

Check status in SQL Database

Go to your SQL server resource in the Azure portal. Select Azure Active Directory under the Settings carte du jour.

Check status in SQL Managed Instance

Go to your SQL managed instance resource in the Azure portal. Select Active Directory admin under the Settings menu.

Test SQL authentication with connection failure

Afterwards enabling Azure Advertizing-only authentication, exam with SQL Server Direction Studio (SSMS) to connect to your SQL Database or SQL Managed Instance. Apply SQL hallmark for the connection.

You should see a login failed message like to the following output:

              Cannot connect to <myserver>.database.windows.internet. Additional data:   Login failed for user 'username'. Reason: Azure Active Directory only hallmark is enabled.   Please contact your system administrator. (Microsoft SQL Server, Error: 18456)                          

By disabling the Azure AD-but authentication feature, you lot allow both SQL authentication and Azure Advertizement hallmark for Azure SQL.

  • Portal
  • The Azure CLI
  • PowerShell

Disable in SQL Database using Azure portal

  1. Using the user with the SQL Security Director role, become to the Azure portal.
  2. Become to your SQL server resource, and select Azure Active Directory nether the Settings menu.
  3. To disable the Azure Advert-just authentication characteristic, uncheck the Support only Azure Active Directory authentication for this server checkbox and Save the setting.

Disable in SQL Managed Instance using Azure portal

  1. Using the user with the SQL Security Manager role, go to the Azure portal.
  2. Go to your SQL managed case resource, and select Agile Directory admin under the Settings menu.
  3. To disable the Azure Ad-just authentication characteristic, uncheck the Back up only Azure Active Directory authentication for this managed instance checkbox and Save the setting.

Test connecting to Azure SQL once more

Afterwards disabling Azure AD-merely authentication, test connecting using a SQL hallmark login. Yous should now be able to connect to your server or example.

Next steps

  • Azure Advertising-only hallmark with Azure SQL
  • Create server with Azure AD-only authentication enabled in Azure SQL
  • Using Azure Policy to enforce Azure Active Directory only hallmark with Azure SQL