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

Does sqlalchemy-kusto support using access token returned from Microsoft AAD service principal? #19

Open
kachely26 opened this issue Jun 19, 2024 · 0 comments

Comments

@kachely26
Copy link

Is your feature request related to a problem? Please describe.
We previous use the below parameter to connect Kusto.

from sqlalchemy_kusto import connect

# Define your Kusto connection details
kusto_url = "https://<kusto_cluster>.kusto.windows.net"
database_name = "<your_database_name>"
kusto_client_id = "<your_client_id>"
kusto_client_secret = "<your_client_secret>"
kusto_tenant_id = "<your_tenant_id>"

# Connect to Kusto using AAD authentication
connection = connect(
    cluster=kusto_url,
    database=database_name,
    msi=False,
    azure_ad_client_id=kusto_client_id,
    azure_ad_client_secret=kusto_client_secret,
    azure_ad_tenant_id=kusto_tenant_id,
)

# Execute a sample query
result = connection.execute("select 1").fetchall()
print(result)

However, secret is not supported due to security concern. Is it supported to use the access_token returned from service principal as the authentication in kusto?

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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

1 participant