-
Notifications
You must be signed in to change notification settings - Fork 35
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
Azure CLI authentication support #339
Comments
As a temporary solution, I'm relying on "accessToken" and acquire the token manually: from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
df.write.format("com.microsoft.kusto.spark.datasource").option(
"accessToken",
credential.get_token(f"https://{cluster}.kusto.windows.net").token
)
# other options... |
Hi @letmaik , will consider this for a subsequent release There were 2 considerations why AZ CLI was not considered The easiest is to get an auth token (MSAL / Azure identity API) or performing a REST call for the Auth, getting the JWT token and using it in the auth token. This is how it is preferred in notebooks as well. |
@ag-ramachandran You're right that Azure CLI auth doesn't fit into the common scenarios where Spark is used. In my case, I'm running a pyspark script on a single node and merely using it for the ability of not running out of memory while staying within the limits on that node in terms of disk space, etc. Having said that, CLI auth may be useful for local dev testing or CI testing that doesn't run on a full cluster. |
The driver supports authentication via:
I would like to authenticate via Azure CLI credentials in the same way you would via
AzureCliCredential()
through the Azure SDK for Python: https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.azureclicredential?view=azure-python.The text was updated successfully, but these errors were encountered: