Skip to content

Commit a3eae29

Browse files
author
MightyPen
committed
Applying emailed answer sent to Ted.H, from David-Engel. pyODBC and AAD interactive.
1 parent 8401f10 commit a3eae29

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

docs/connect/python/pyodbc/step-3-proof-of-concept-connecting-to-sql-using-pyodbc.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Step 3: Proof of concept connecting to SQL using pyodbc | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "08/08/2017"
4+
ms.date: "10/09/2019"
55
ms.prod: sql
66
ms.prod_service: connectivity
77
ms.reviewer: ""
@@ -70,7 +70,24 @@ while row:
7070
print 'Inserted Product key is ' + str(row[0])
7171
row = cursor.fetchone()
7272
```
73-
`
74-
## Next steps
73+
74+
## Azure Active Directory (AAD) and the connection string
75+
76+
pyODBC uses the Microsoft ODBC driver for SQL Server.
77+
If your version of the ODBC driver is 17.1 or later, you can use the AAD interactive mode of the ODBC driver through pyODBC.
78+
This AAD interactive option works if Python and pyODBC allow the ODBC driver to pop up the dialog.
79+
This option is available only on the Windows operating system.
80+
81+
### Example connection string for AAD interactive authentication
82+
83+
Here is an example ODBC connection string that specifies AAD interactive authentication:
84+
85+
- `server=Server;database=Database;UID=UserName;Authentication=ActiveDirectoryInteractive;`
86+
87+
For details on the AAD authentication options of the ODBC driver, see the following article:
88+
89+
- [Using Azure Active Directory with the ODBC Driver](../../odbc/using-azure-active-directory#new-andor-modified-dsn-and-connection-string-keywords)
90+
91+
## Next steps
7592

7693
For more information, see the [Python Developer Center](https://azure.microsoft.com/develop/python/).

0 commit comments

Comments
 (0)