|
3 | 3 | **Before building and running the Password project**: |
4 | 4 | 1. In Program.cs, locate the following lines of code and replace the server/database name with your server/database name. |
5 | 5 | ``` |
6 | | -builder["Data Source"] = "aad-managed-demo.database.windows.net "; // replace 'aad-managed-demo' with your server name |
| 6 | +builder["Data Source"] = "<servername>.database.windows.net "; // replace '<servername>' with your server name |
7 | 7 | builder["Initial Catalog"] = "demo"; // replace with your database name |
8 | 8 | ``` |
9 | | -2. Locate the following line of code and replace username, with the name of the Azure AD user you want to connect as. |
| 9 | +2. Locate the following line of code and replace username, with the name of the Microsoft Entra ID user you want to connect as. |
10 | 10 | ``` |
11 | | -string username = "bob@cqclinic.onmicrosoft.com"; // replace with your username |
| 11 | +string username = "bob@contoso.com"; // replace with your username |
12 | 12 | ``` |
13 | | -Note: A contained user database must exist and a contained database user representing the specified Azure AD user or one of the groups, the specified Azure AD user belongs to, must exist in the database and must have the CONNECT permission (except for AAD server admin or group) |
| 13 | +Note: A contained user database must exist and a contained database user representing the specified Microsoft Entra ID user or one of the groups, the specified Microsoft Entra ID user belongs to, must exist in the database and must have the CONNECT permission (except for AAD server admin or group) |
14 | 14 |
|
15 | | -Please note that |
16 | | -builder["Authentication"] method is set to SqlAuthenticationMethod.ActiveDirectoryPassword. |
| 15 | +Please note that the `builder["Authentication"]` method is set to `SqlAuthenticationMethod.ActiveDirectoryPassword`. |
17 | 16 |
|
18 | 17 |  |
19 | 18 |
|
20 | | -When running this program an execution window a prompt for the Azure AD password request for user bob@cqclinic.onmicrosoft.com will appear. Once the password is entered the message should indicate a successful connection to the database followed by “Please press any key to stop”: |
| 19 | +When running this program an execution window a prompt for the Microsoft Entra ID password request for user bob@cqclinic.onmicrosoft.com will appear. Once the password is entered the message should indicate a successful connection to the database followed by “Please press any key to stop”: |
21 | 20 |
|
22 | 21 |  |
0 commit comments