Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
531 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi ,
I am trying to use user assigned managed identity to connect with KUSTO db but getting internal server error 500 . kusto db already given the permissions to my managed identity .
I am concern about the app service environment variable is that playing any role ?
Your support much appreciated. Thanks you
Hello SohamPrasad, To resolve a 500 Internal Server Error when connecting to Kusto DB with a User Assigned Managed Identity, here are some key areas to check:
AZURE_CLIENT_ID
: Set this to the Client ID of your User Assigned Managed Identity. This tells the App Service which managed identity to use when connecting to Kusto DB. To set environment variables, go to App Service > Settings > Configuration in the Azure Portal, and add AZURE_CLIENT_ID
under Application settings.AZURE_CLIENT_ID
to specify the correct identity:
from azure.kusto.data import KustoConnectionStringBuilder
from azure.identity import ManagedIdentityCredential
credential = ManagedIdentityCredential(client_id="YOUR_MANAGED_IDENTITY_CLIENT_ID")
kcsb = KustoConnectionStringBuilder.with_aad_managed_identity("https://<your-cluster-name>.<region>.kusto.windows.net", credential=credential)
Replace "YOUR_MANAGED_IDENTITY_CLIENT_ID"
with your actual client ID, and "<your-cluster-name>.<region>.kusto.windows.net"
with your Kusto cluster endpoint.If the information helped address your question, please Accept the answer.
Luis