Skip to content

Commit 243f435

Browse files
authored
Merge pull request #108688 from CarlRabeler/login
another pass on the intro section
2 parents 563cce8 + 07f3ac2 commit 243f435

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed
161 KB
Loading
182 KB
Loading

articles/sql-database/sql-database-manage-logins.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Logins and users
3-
description: Learn about how Azure SQL Database and Azure Synapse Analytics authenticate users for access using logins and user accounts and uses roles and explicit permissions to authorize logins and users to perform actions within databases as well as at the server level.
2+
title: Authorize server and database access using logins and user accounts
3+
description: Learn about how Azure SQL Database and Azure Synapse Analytics authenticate users for access using logins and user accounts. Also learn how to database roles and explicit permissions to authorize logins and users to perform actions and query data.
44
keywords: sql database security,database security management,login security,database security,database access
55
services: sql-database
66
ms.service: sql-database
@@ -11,50 +11,60 @@ ms.topic: conceptual
1111
author: VanMSFT
1212
ms.author: vanto
1313
ms.reviewer: carlrab
14-
ms.date: 03/12/2020
14+
ms.date: 03/23/2020
1515
---
16-
# Granting database access and authorization to SQL Database and Azure Synapse Analytics using logins and user accounts
16+
# Authorizing database access to authenticated users to SQL Database and Azure Synapse Analytics using logins and user accounts
1717

18-
Authenticated access to databases in Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL Data Warehouse) is managed using logins and user accounts. [**Authentication**](sql-database-security-overview.md#authentication) is the process of proving the user is who they claim to be.
18+
In this article, you learn about:
1919

20-
- A login is an individual account in the master database
21-
- A user account is an individual account in any database, and does not have to be associated with a login
20+
- Options for configuring Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL Data Warehouse) to enable users to perform administrative tasks and to the access the data stored in these databases.
21+
- The access and authorization configuration after initially creating a new Azure SQL Database
22+
- How to add logins and user accounts in the master database and user accounts and then grant these accounts administrative permissions
23+
- How to add user accounts in user databases, either associated with logins or as contained user accounts
24+
- Configure user accounts with permissions in user databases by using database roles and explicit permissions
2225

2326
> [!IMPORTANT]
24-
> Databases in Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL Data Warehouse) are referred to collectively in the remainder of this article as Azure SQL Database (for simplicity).
27+
> Databases in Azure SQL Database and Azure Synapse Analytics (formerly Azure SQL Data Warehouse) are referred to collectively in the remainder of this article as either databases or as Azure SQL (for simplicity).
2528
26-
A database user connects to an Azure SQL database using a user account and is authenticated using one of the following two methods:
29+
## Authentication and authorization
2730

28-
- [SQL authentication](https://docs.microsoft.com/sql/relational-databases/security/choose-an-authentication-mode#connecting-through-sql-server-authentication), which consists of a login name or user account name and associated password stored in the Azure SQL Database.
29-
- [Azure Active Directory Authentication](sql-database-aad-authentication.md), which uses login credentials stored in Azure Active Directory
31+
[**Authentication**](sql-database-security-overview.md#authentication) is the process of proving the user is who they claim to be. A user connects to a database using a user account.
32+
When a user attempts to connect to a database, they provide a user account and authentication information. The user is authenticated using one of the following two authentication methods:
3033

31-
Authorization to access data and perform various actions within Azure SQL database are managed using database roles and explicit permissions. [**Authorization**](sql-database-security-overview.md#authorization) refers to the permissions assigned to a user within an Azure SQL Database, and determines what the user is allowed to do. Authorization is controlled by your user account's database [role memberships](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/database-level-roles) and [object-level permissions](https://docs.microsoft.com/sql/relational-databases/security/permissions-database-engine). As a best practice, you should grant users the least privileges necessary.
34+
- [SQL authentication](https://docs.microsoft.com/sql/relational-databases/security/choose-an-authentication-mode#connecting-through-sql-server-authentication).
3235

33-
In this article, you will learn:
36+
With this authentication method, the user submits a user account name and associated password to establish a connection. This password is stored in the master database for user accounts linked to a login or stored in the database containing the user account for user accounts not linked to a login.
37+
- [Azure Active Directory Authentication](sql-database-aad-authentication.md)
3438

35-
- The access and authorization configuration after initially creating a new Azure SQL Database
36-
- How to add logins and user accounts in the master database and user accounts and then grant these accounts administrative permissions
37-
- How to add user accounts in user databases, either associated with logins or as contained user accounts
38-
- Configure user accounts with permissions in user databases by using database roles and explicit permissions
39+
With this authentication method, the user submits a user account name and requests that the service use the credential information stored in Azure Active Directory.
40+
41+
**Logins and users**: In Azure SQL, a user account in a database can be associated with a login that is stored in the master database or can be a user name that is stored in an individual database.
42+
43+
- A **login** is an individual account in the master database, to which a user account in one or more databases can be linked. With a login, the credential information for the user account is stored with the login.
44+
- A **user account** is an individual account in any database that may be but does not have to be linked to a login. With a user account that is not linked to a login, the credential information is stored with the user account.
45+
46+
[**Authorization**](sql-database-security-overview.md#authorization) to access data and perform various actions are managed using database roles and explicit permissions. Authorization refers to the permissions assigned to a user, and determines what that user is allowed to do. Authorization is controlled by your user account's database [role memberships](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/database-level-roles) and [object-level permissions](https://docs.microsoft.com/sql/relational-databases/security/permissions-database-engine). As a best practice, you should grant users the least privileges necessary.
3947

4048
## Existing logins and user accounts after creating a new database
4149

42-
When you create your first Azure SQL Database deployment, you specify an admin login and an associated password for that login. This administrative account is called **Server admin**. The following configuration of logins and users in the master and user databases occurs during deployment:
50+
When you create your first Azure SQL deployment, you specify an admin login and an associated password for that login. This administrative account is called **Server admin**. The following configuration of logins and users in the master and user databases occurs during deployment:
4351

4452
- A SQL login with administrative privileges is created using the login name you specified. A [login](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/principals-database-engine#sa-login) is an individual user accounts for logging on to SQL Database.
4553
- This login is granted full administrative permissions on all databases as a [server-level principal](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/principals-database-engine). This login has all available permissions within SQL Database and cannot be limited. In a managed instance, this login is added to the [sysadmin fixed server role](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/server-level-roles) (this role does not exist with single or pooled databases).
4654
- A [user account](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/getting-started-with-database-engine-permissions#database-users) called `dbo` is created for this login in each user database. The [dbo](https://docs.microsoft.com/sql/relational-databases/security/authentication-access/principals-database-engine) user has all database permissions in the database and is mapped to the `db_owner` fixed database role. Additional fixed database roles are discussed later in this article.
4755

48-
To identify the administrator accounts for your SQL server, open the Azure portal, and navigate to the **Properties** tab of your SQL server or SQL Database.
56+
To identify the administrator accounts for a database, open the Azure portal, and navigate to the **Properties** tab of your server or managed instance.
4957

5058
![SQL Server Admins](media/sql-database-manage-logins/sql-admins.png)
5159

60+
![SQL Server Admins](media/sql-database-manage-logins/sql-admins2.png)
61+
5262
> [!IMPORTANT]
5363
> The admin login name cannot be changed after it has been created. To reset the password for the logical server admin, go to the [Azure portal](https://portal.azure.com), click **SQL Servers**, select the server from the list, and then click **Reset Password**. To reset the password for a managed instance server, go to the Azure portal, click the instance, and click **Reset password**. You can also use PowerShell or the Azure CLI.
5464
5565
## Create additional logins and users having administrative permissions
5666

57-
At this point, your SQL Database is only configured for access using a single SQL login and user account. To create additional logins with full or partial administrative permissions, you have the following options (depending on your deployment mode):
67+
At this point, your Azure SQL instance is only configured for access using a single SQL login and user account. To create additional logins with full or partial administrative permissions, you have the following options (depending on your deployment mode):
5868

5969
- **Create an Azure Active Directory administrator account having full administrative permissions**
6070

0 commit comments

Comments
 (0)