Skip to content

Commit 680615b

Browse files
Update README.md
1 parent ad4d73f commit 680615b

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

  • samples/features/security/azure-active-directory-auth/password

samples/features/security/azure-active-directory-auth/password/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@
33
**Before building and running the Password project**:
44
1. In Program.cs, locate the following lines of code and replace the server/database name with your server/database name.
55
```
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
77
builder["Initial Catalog"] = "demo"; // replace with your database name
88
```
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.
1010
```
11-
string username = "bob@cqclinic.onmicrosoft.com"; // replace with your username
11+
string username = "bob@contoso.com"; // replace with your username
1212
```
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)
1414

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`.
1716

1817
![screenshot of visual studio showing builder fields to change](../img/vs-authentication-method-password.png)
1918

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”:
2120

2221
![screenshot of application after successful authentication- "press any key to stop"](../img/pwd-press-any-key-to-stop.png)

0 commit comments

Comments
 (0)