Skip to content

Commit 3b933f7

Browse files
authored
Merge pull request #174470 from VanMSFT/updateaadonlyauth
Update AAD-only auth for DB portal support
2 parents 7d010a8 + 063a2b7 commit 3b933f7

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

articles/azure-sql/database/authentication-azure-ad-only-authentication-create-server.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.topic: how-to
88
author: GithubMirek
99
ms.author: mireks
1010
ms.reviewer: vanto
11-
ms.date: 08/31/2021
11+
ms.date: 10/04/2021
1212
---
1313

1414
# Create server with Azure AD-only authentication enabled in Azure SQL
@@ -28,7 +28,7 @@ This how-to guide outlines the steps to create a [logical server](logical-server
2828

2929
## Permissions
3030

31-
To provision an logical server or managed instance, you'll need to have the appropriate permissions to create these resources. Azure users with higher permissions, such as subscription [Owners](../../role-based-access-control/built-in-roles.md#owner), [Contributors](../../role-based-access-control/built-in-roles.md#contributor), [Service Administrators](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles), and [Co-Administrators](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles) have the privilege to create a SQL server or managed instance. To create these resources with the least privileged Azure RBAC role, use the [SQL Server Contributor](../../role-based-access-control/built-in-roles.md#sql-server-contributor) role for SQL Database and [SQL Managed Instance Contributor](../../role-based-access-control/built-in-roles.md#sql-managed-instance-contributor) role for Managed Instance.
31+
To provision a logical server or managed instance, you'll need to have the appropriate permissions to create these resources. Azure users with higher permissions, such as subscription [Owners](../../role-based-access-control/built-in-roles.md#owner), [Contributors](../../role-based-access-control/built-in-roles.md#contributor), [Service Administrators](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles), and [Co-Administrators](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles) have the privilege to create a SQL server or managed instance. To create these resources with the least privileged Azure RBAC role, use the [SQL Server Contributor](../../role-based-access-control/built-in-roles.md#sql-server-contributor) role for SQL Database and [SQL Managed Instance Contributor](../../role-based-access-control/built-in-roles.md#sql-managed-instance-contributor) role for Managed Instance.
3232

3333
The [SQL Security Manager](../../role-based-access-control/built-in-roles.md#sql-security-manager) Azure RBAC role doesn't have enough permissions to create a server or instance with Azure AD-only authentication enabled. The [SQL Security Manager](../../role-based-access-control/built-in-roles.md#sql-security-manager) role will be required to manage the Azure AD-only authentication feature after server or instance creation.
3434

@@ -38,13 +38,53 @@ The following section provides you with examples and scripts on how to create a
3838

3939
In our examples, we're enabling Azure AD-only authentication during server or managed instance creation, with a system assigned server admin and password. This will prevent server admin access when Azure AD-only authentication is enabled, and only allows the Azure AD admin to access the resource. It's optional to add parameters to the APIs to include your own server admin and password during server creation. However, the password cannot be reset until you disable Azure AD-only authentication.
4040

41-
To change the existing properties after server or managed instance creation, other existing APIs should be used. See [Managing Azure AD-only authentication using APIs](authentication-azure-ad-only-authentication.md#managing-azure-ad-only-authentication-using-apis) and [Configure and manage Azure AD authentication with Azure SQL](authentication-aad-configure.md) for more information.
41+
To change the existing properties after server or managed instance creation, other existing APIs should be used. For more information, see [Managing Azure AD-only authentication using APIs](authentication-azure-ad-only-authentication.md#managing-azure-ad-only-authentication-using-apis) and [Configure and manage Azure AD authentication with Azure SQL](authentication-aad-configure.md).
4242

4343
> [!NOTE]
4444
> If Azure AD-only authentication is set to false, which it is by default, a server admin and password will need to be included in all APIs during server or managed instance creation.
4545
4646
## Azure SQL Database
4747

48+
# [Portal](#tab/azure-portal)
49+
50+
1. Browse to the [Select SQL deployment](https://portal.azure.com/#create/Microsoft.AzureSQL) option page in the Azure portal.
51+
52+
1. If you aren't already signed in to Azure portal, sign in when prompted.
53+
54+
1. Under **SQL databases**, leave **Resource type** set to **Single database**, and select **Create**.
55+
56+
1. On the **Basics** tab of the **Create SQL Database** form, under **Project details**, select the desired Azure **Subscription**.
57+
58+
1. For **Resource group**, select **Create new**, enter a name for your resource group, and select **OK**.
59+
60+
1. For **Database name**, enter a name for your database.
61+
62+
1. For **Server**, select **Create new**, and fill out the new server form with the following values:
63+
64+
- **Server name**: Enter a unique server name. Server names must be globally unique for all servers in Azure, not just unique within a subscription. Enter a value, and the Azure portal will let you know if it's available or not.
65+
- **Location**: Select a location from the dropdown list
66+
- **Authentication method**: Select **Use only Azure Active Directory (Azure AD) authentication**.
67+
- Select **Set admin**, which brings up a menu to select an Azure AD principal as your logical server Azure AD administrator. When you're finished, use the **Select** button to set your admin.
68+
69+
:::image type="content" source="media/authentication-azure-ad-only-authentication/azure-ad-portal-create-server.png" alt-text="screenshot of creating a server with Azure AD-only authentication enabled":::
70+
71+
1. Select **Next: Networking** at the bottom of the page.
72+
73+
1. On the **Networking** tab, for **Connectivity method**, select **Public endpoint**.
74+
75+
1. For **Firewall rules**, set **Add current client IP address** to **Yes**. Leave **Allow Azure services and resources to access this server** set to **No**.
76+
77+
1. Leave **Connection policy** and **Minimum TLS version** settings as their default value.
78+
79+
1. Select **Next: Security** at the bottom of the page. Configure any of the settings for **Azure Defender for SQL**, **Ledger**, **Identity**, and **Transparent data encryption** for your environment. You can also skip these settings.
80+
81+
> [!NOTE]
82+
> Using a user-assigned managed identity (UMI) is not supported with Azure AD-only authentication. Do not set the the server identity in the **Identity** section as a UMI.
83+
84+
1. Select **Review + create** at the bottom of the page.
85+
86+
1. On the **Review + create** page, after reviewing, select **Create**.
87+
4888
# [The Azure CLI](#tab/azure-cli)
4989

5090
The Azure CLI command `az sql server create` is used to provision a new logical server. The below command will provision a new server with Azure AD-only authentication enabled.
@@ -95,7 +135,7 @@ For more information, see [New-AzSqlServer](/powershell/module/az.sql/new-azsqls
95135

96136
# [Rest API](#tab/rest-api)
97137

98-
The [Servers - Create Or Update](/rest/api/sql/2020-11-01-preview/servers/create-or-update) Rest API can be used to create an logical server with Azure AD-only authentication enabled during provisioning.
138+
The [Servers - Create Or Update](/rest/api/sql/2020-11-01-preview/servers/create-or-update) Rest API can be used to create a logical server with Azure AD-only authentication enabled during provisioning.
99139

100140
The script below will provision a logical server, set the Azure AD admin as `<AzureADAccount>`, and enable Azure AD-only authentication. The server SQL Administrator login will also be created automatically and the password will be set to a random password. Since SQL Authentication connectivity is disabled with this provisioning, the SQL Administrator login won't be used.
101141

@@ -251,6 +291,10 @@ You can also use the following template. Use a [Custom deployment in the Azure p
251291

252292
## Azure SQL Managed Instance
253293

294+
# [Portal](#tab/azure-portal)
295+
296+
Managing or deploying a managed instance with Azure AD-only authentication using the Azure portal is currently not supported. You can deploy a managed instance with Azure AD-only authentication using the Azure CLI, PowerShell, Rest API, or with an ARM template.
297+
254298
# [The Azure CLI](#tab/azure-cli)
255299

256300
The Azure CLI command `az sql mi create` is used to provision a new Azure SQL Managed Instance. The below command will provision a new managed instance with Azure AD-only authentication enabled.
@@ -661,12 +705,12 @@ Once the deployment is complete for your managed instance, you may notice that t
661705

662706
## Limitations
663707

664-
- Creating a server or instance using the Azure portal with Azure AD-only authentication enabled during provisioning is currently not supported.
708+
- Creating a managed instance using the Azure portal with Azure AD-only authentication enabled during provisioning is currently not supported.
665709
- To reset the server administrator password, Azure AD-only authentication must be disabled.
666710
- If Azure AD-only authentication is disabled, you must create a server with a server admin and password when using all APIs.
667711

668712
## Next steps
669713

670714
- If you already have a SQL server or managed instance, and just want to enable Azure AD-only authentication, see [Tutorial: Enable Azure Active Directory only authentication with Azure SQL](authentication-azure-ad-only-authentication-tutorial.md).
671715
- For more information on the Azure AD-only authentication feature, see [Azure AD-only authentication with Azure SQL](authentication-azure-ad-only-authentication.md).
672-
- If you are looking to enforce server creation with Azure AD-only authentication enabled, see [Azure Policy for Azure Active Directory only authentication with Azure SQL](authentication-azure-ad-only-authentication-policy.md)
716+
- If you're looking to enforce server creation with Azure AD-only authentication enabled, see [Azure Policy for Azure Active Directory only authentication with Azure SQL](authentication-azure-ad-only-authentication-policy.md)
34.9 KB
Loading

0 commit comments

Comments
 (0)