You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mysql/howto-configure-sign-in-azure-ad-authentication.md
+41-38Lines changed: 41 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,42 +35,7 @@ Only one Azure AD admin can be created per MySQL server and selection of another
35
35
36
36
In a future release we will support specifying an Azure AD group instead of an individual user to have multiple administrators, however this is currently not supported yet.
37
37
38
-
## Creating Azure AD users in Azure Database for MySQL
39
-
40
-
To add an Azure AD user to your Azure Database for MySQL database, perform the following steps after connecting (see later section on how to connect):
41
-
42
-
1. First ensure that the Azure AD user `<user>@yourtenant.onmicrosoft.com` is a valid user in Azure AD tenant.
43
-
2. Sign in to your Azure Database for MySQL instance as the Azure AD Admin user.
44
-
3. Create user `<user>@yourtenant.onmicrosoft.com` in Azure Database for MySQL.
> Authenticating a user through Azure AD does not give the user any permissions to access objects within the Azure Database for MySQL database. You must grant the user the required permissions manually.
62
-
63
-
## Creating Azure AD groups in Azure Database for MySQL
64
-
65
-
To enable an Azure AD group for access to your database, use the same mechanism as for users, but instead specify the group name:
66
-
67
-
**Example:**
68
-
69
-
```sql
70
-
CREATE AADUSER 'Prod_DB_Readonly';
71
-
```
72
-
73
-
When logging in, members of the group will use their personal access tokens, but sign with the group name specified as the username.
38
+
After configuring the administrator, you can now sign in:
74
39
75
40
## Connecting to Azure Database for MySQL using Azure AD
76
41
@@ -151,16 +116,54 @@ When connecting you need to use the access token as the MySQL user password. Whe
151
116
When using the CLI, you can use this short-hand to connect:
Note the “enable-cleartext-plugin” setting – you need to use a similar configuration with other clients to make sure the token gets sent to the server without being hashed.
161
127
162
128
You are now authenticated to your MySQL server using Azure AD authentication.
163
129
130
+
## Creating Azure AD users in Azure Database for MySQL
131
+
132
+
To add an Azure AD user to your Azure Database for MySQL database, perform the following steps after connecting (see later section on how to connect):
133
+
134
+
1. First ensure that the Azure AD user `<user>@yourtenant.onmicrosoft.com` is a valid user in Azure AD tenant.
135
+
2. Sign in to your Azure Database for MySQL instance as the Azure AD Admin user.
136
+
3. Create user `<user>@yourtenant.onmicrosoft.com` in Azure Database for MySQL.
> Authenticating a user through Azure AD does not give the user any permissions to access objects within the Azure Database for MySQL database. You must grant the user the required permissions manually.
154
+
155
+
## Creating Azure AD groups in Azure Database for MySQL
156
+
157
+
To enable an Azure AD group for access to your database, use the same mechanism as for users, but instead specify the group name:
158
+
159
+
**Example:**
160
+
161
+
```sql
162
+
CREATE AADUSER 'Prod_DB_Readonly';
163
+
```
164
+
165
+
When logging in, members of the group will use their personal access tokens, but sign with the group name specified as the username.
166
+
164
167
## Token Validation
165
168
166
169
Azure AD authentication in Azure Database for MySQL ensures that the user exists in the MySQL server, and it checks the validity of the token by validating the contents of the token. The following token validation steps are performed:
0 commit comments