Skip to content

Commit d87229f

Browse files
committed
Last update with connection string
1 parent 409fe10 commit d87229f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/postgresql/flexible-server/connect-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ In this section, you add authentication code to your working directory and perfo
111111

112112
# Use passwordless authentication via DefaultAzureCredential.
113113
# Call get_token() to get a token from Microsft Entra ID and add it as the password in the connection string.
114-
# Note the requested scope parameter in the call to get_token, "https://ossrdbms-aad.database.windows.net".
114+
# Note the requested scope parameter in the call to get_token, "https://ossrdbms-aad.database.windows.net/.default".
115115
credential = DefaultAzureCredential()
116-
token=credential.get_token("https://ossrdbms-aad.database.windows.net").token
116+
token=credential.get_token("https://ossrdbms-aad.database.windows.net/.default").token
117117

118118
conn_string = f"host={host} user={user} dbname={dbname} password={token} sslmode={sslmode}"
119119
return conn_string

0 commit comments

Comments
 (0)