Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token-based authentication to Azure SQL Server #9

Open
jeffjon12 opened this issue Aug 21, 2020 · 5 comments
Open

Token-based authentication to Azure SQL Server #9

jeffjon12 opened this issue Aug 21, 2020 · 5 comments

Comments

@jeffjon12
Copy link

I have need to authenticate to Azure SQL Server using token based authentication. This is possible in other languages like Python because the ODBC packages like pyodbc support pre-connection attributes (mkleehammer/pyodbc#228). However, none of the R ODBC packages: RODBC (https://www.rdocumentation.org/packages/RODBC), ODBC (https://www.rdocumentation.org/packages/odbc), or r-dbi (https://www.rdocumentation.org/packages/DBI), support pre-connection attributes.

I can't use ActiveDirectoryPassword authentication because this doesn't work from Mac/Linux when the user is a guest of the tenant.

It'd be great if MS could provides means of token-based authentication to Azure SQL Server.

@jeffjon12
Copy link
Author

I've worked around this for now by using Reticulate to call out to Python code which makes the DB connection and runs the query. However, that's a pretty poor experience for R users to need to have Python installed and configured properly for this scenario.

@hongooi73
Copy link
Collaborator

I think this belongs more in the odbc repo. Maybe @jimhester could comment.

@hongooi73
Copy link
Collaborator

Open feature request here: r-dbi/odbc#299

@olesendan
Copy link

olesendan commented May 18, 2021

@jeffjon12 I'm looking in using this in my workflow. How is your Work around holding up?
If I'm allready using reticulate in my workflow, how hard is it to implement this solution?

@jeffjon12
Copy link
Author

Dependency management turned out to be too difficult with reticulate, so we ended up wrapping the R code with Python which performs the query, writes the results to a file, and then calls R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants